Release Procedure
Release Manager: Andre Merzky
Preconditions for release
If release is a milestone release: no open tickets for milestone;
all tests on
devel
pass.
Preparing a regular Release
git prep
git release
git bump minor
git prep is a git script for the following steps:
git co master --> checkout master
git pa --> pull all branches form remote
git gone -a --> remove all stale branches
git merge devel --> merge the release candidate
git change >> CHANGES.md --> draft changelog from new commits in master
gvim -o VERSION CHANGES.md --> set new version if needed, make CHANGELOG human readable
After that that last manual intervention, the actual release itself with git release runs:
git ci -am 'version bump' --> commit VERSION and CHANGELOG changes
git tag \"v$(cat VERSION)\" --> tag the release
git push --> push master to origin
git push --tags --> push the release tag
make upload --> push to pypi
git co devel --> checkout devel
git merge master --> merge the release into devel
git bump minor --> bump minor version
git ci -am 'devel version bump' --> commit minor version bump on devel
git dsync -a --> sync all branches to be in sync with devel
That last step is hard to automate as it involves resolving conflicts in all branches. But it is also important as it saved us over the last years from branches running out of sync with devel. git-dsync is a custom script which, essentially, does the following (pseudo-code)
git checkout devel
git pull
for each branch in $(git branch -a)
do
git checkout branch
git pull
git merge devel
git push
done
Preparing a hotfix release
Create branch from latest master: e.g.
git checkout master; git pull; git checkout -b hotfix/issue_123
;update version
echo "0.1.2" > VERSION
;make modifications to branch: either by
$EDITOR
orgit cherry-pick abcsuperdupercommit890
(The latter is preferred);update release notes:
$EDITOR CHANGES.md
;commit and push:
git commit -a; git push
;- create `pull-request
<https://github.com/radical-cybertools/radical.pilot/pulls>`__ of hotfix branch to master;
wait on and/or nudge other developer to review and test;
if not approved,
GOTO 3
.
Perform a Release
If approved, move to master branch and pull in merged content:
git checkout master
, thengit pull
;create tag:
git tag -a v0.1.2 -m "release v0.1.2.3"
;push tag to github:
git push --tags
;release on PyPI:
python setup.py sdist; twine upload --skip-existing dist/radical.xyz-0.1.2.tar.gz
;verify PyPI version on
https://pypi.python.org/pypi/radical.xyz
;GOTO "Post Release"
.
Post Release
Merge master into devel branch:
git checkout devel; git merge master; git push
;merge
devel
into all open development branches:for b in $branches; do git checkout $b; git merge devel; done
.
Testing twine and PyPI release
Register at PyPI;
create the test release:
python setup.py sdist
;Upload your test release to
test.pypi
:twine upload -r testpypi --skip-existing dist/radical.xyz-0.1.2.tar.gz
;Check/test your release. More information at Using test PyPI.