bitex
bitex copied to clipboard
Automatic versioning for master, dev, and release branches
- [ ] 1. Version
Release-Candidates, suffixed withrc, by using a tag suffixedrctoorigin(git push origin <tag>)
Workflow:
In my local git repo, on the dev branch, I tag a new release candidate version, and push this tag upstream. I do not modify the setup.py version.
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git branch
* dev
master
nightly
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git tag 2.0.0rc1
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git push origin 2.0.0rc1
(/home/nils/anaconda3)nils@chantico:~/git/bitex> python setup.py sdist && twine upload dist/*
The reason for this is because I tend to forget bumping the version number in setup.py when doing multiple deploys in a short-time.
To circumvent this issue, we only deploy on a pushed tag as a failsafe, and take the tag name directly as version name. That also means, that the release branch will always stay the same for the lifetime of the branch.
- [x] 2. Version Nightly builds by using the version in
setup.pyand suffixing it with the current YearMonthDay when building via cronjob, once a day.
Workflow
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git branch
dev
master
* nightly
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git pull origin dev
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git merge --no-ff dev
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git push
(/home/nils/anaconda3)nils@chantico:~/git/bitex> python setup.py sdist && twine upload dist/*
- [ ] 3. Deploy from
masterby using the setup.py when a tag is pushed frommastertoorigin(standard upload procedure).
Workflow
In my local git repo, on the master branch, I tag a new release version, and push this tag upstream. I modify the setup.py version to match the branch.
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git branch
dev
* master
nightly
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git add setup.py && git commit -m "bumped version to release 2.1.0
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git tag 2.1.0
(/home/nils/anaconda3)nils@chantico:~/git/bitex> git push origin 2.1.0
(/home/nils/anaconda3)nils@chantico:~/git/bitex> python setup.py sdist && twine upload dist/*
110.1 and 110.3 aren't possible with travis, since originating branches are not available when a tag is pushed.
However, since we can access the tag name with $TRAVIS_TAG we can simply check this, in order to deduce what kind of deploy should be issued.