Tagging » History » Version 13
« Previous -
Version 13/23
(diff) -
Next » -
Current version
Herbert Greenlee, 03/20/2015 09:35 AM
- Table of contents
- Tagging a branch for release (git flow release branch method)
- Tagging a branch for release (manual method)
Tagging a branch for release (git flow release branch method)¶
Make a new mrb development area corresponding to the base release of larsoft you are using.
export MRB_PROJECT=larsoft mrb newDev -v v04_03_01 -q e7:prof ... cd $MRB_TOP source localProducts*/setup
If necessary, check out uboonecode and dependent packages that are not part of larsoft (ubutil).
cd $MRB_SOURCE mrb g uboonecode mrb g ubutil
Make sure your local copies of develop and master branches up to date with the main repository. Do this for each checked out package.
cd $MRB_SOURCE/<package> git checkout develop git pull git checkout master git pull
Use git flow to create a release branch in your local repository. Git flow always creates the release branch from the head of develop.
git flow release start v03_08_02
After this command, the newly created release branch will be the checked out branch. At this point, you can make further changes to your release branch, including the version number of the package being tagged and version numbers of dependent products. In particular, you may with to edit the following files.
- ups/product_deps
After making all updates, it is a good idea to do a full test build, including tests.
cd $MRB_BUILDDIR mrb i -j4 mrb t -j4
When you are done updating the release branch, commit updates to your local repository for each package.
cd $MRB_SOURCE/<package> git commit -a
Use git flow to "finish" the release branch.
git flow release finish -m"v03_08_02" v03_08_02
This git flow command does the following actions.
- Merges release branch to master.
- Merges release branch to develop.
- Creates a tag on the master branch.
- Deletes the release branch.
- Checks out the develop branch.
Note that when you merge the release branch into master, you are also merging any updates originally from develop into master.
Now push everything up to main repository.
git push origin develop master git push v03_08_02 # Or git push --tags
Tagging a branch for release (manual method)¶
Releases are built from the master
branch. This recipe shows how to create a tag on the master
branch of a git repository.
Make a new mrb development area corresponding to the base release of larsoft you are using.
export MRB_PROJECT=larsoft mrb newDev -v v04_03_01 -q e7:prof ... cd $MRB_TOP source localProducts*/setup
If necessary, check out uboonecode and dependent packages that are not part of larsoft (ubutil).
cd $MRB_SOURCE mrb g uboonecode mrb g ubutil
Get your local copies of develop and master branches up to date with the main repository.
cd $MRB_SOURCE/<package> git checkout develop git pull git checkout master git pull
Update the master branch with changes from develop.
git merge develop
At this point, you can make further changes to your master branch, including the version number of the package being tagged and version numbers of dependent products. In particular, you may with to edit the following files.
- ups/product_deps
After making all updates, it is a good idea to do a full test build, including tests.
cd $MRB_BUILDDIR mrb i -j4 mrb t -j4
When you are done updating master, commit and push your changes to the main repository.
cd $MRB_SOURCE/<package> git commit -a git push origin master
Now make the actual tag and push the tag to the main repository.
git tag -a -m"v04_03_01" v04_03_01 # Annotated tag. git push origin v04_03_01 # Or git push --tags
If you want to move an existing tag, you need to add option
-f
or --force
to the last two commands.
If you made changes directly on the master branch, like updating the version number in product_deps, you should merge these back into the develop branch.
git checkout develop git merge master git push origin develop