- your local git repository has following remotes:
$ git remote -v show origin email@example.com:<git_user>/federation.git (fetch) origin firstname.lastname@example.org:<git_user>/federation.git (push) rhgit git+ssh://git.app.eng.bos.redhat.com/srv/git/picketlink/federation.git (fetch) rhgit git+ssh://git.app.eng.bos.redhat.com/srv/git/picketlink/federation.git (push) upstream email@example.com:picketlink/federation.git (fetch) upstream firstname.lastname@example.org:picketlink/federation.git (push)
use this section when you don't have latest changes from upstream repository
- fetch the latest changes from upstream remote repository using: git fetch upstream
- make sure you are in master branch by git checkout master
- rebase mater to upstream/master using git rebase -i upstream/master
- inspect master branch using for example gitk --all
Find exact commit you want to place your master pointer at.
- Move master pointer to the commit selected from previous step.
git reset --hard <commit>
It can be done directly from gitk right-clicking desired commit line and selecting "Reset master branch to here". Choose hard mode.
Make sure you have no uncomited changes, because they will go away ;-)
Ensure that you have created a JIRA release task such as https://issues.jboss.org/browse/PLFED-297
You can clone the upstream projects to do the release.
Workspaces to Release
- Federation: need a deploy of artifacts to nexus
- picketlink-quickstarts: need a deploy of artifacts to nexus
- integration-tests: just tagging is sufficient.
Release: git repo part
if your master is already at last commit you want to release
- change <version> in all appropriate files:
perl -pi -e 's/2.1.0-SNAPSHOT/2.1.0.Final/g' `find . -name \pom.xml`
- do mvn clean install to see if all is OK.
- if all is OK, commit the changes git commit -m "release version change: 2.1.0.Final"
- tag the release: git tag -a v2.1.0.Final -m 'version 2.1.0.Final'
- eventually merge commits left aside in pre-release steps to master
- push all changes in master upstream: git push --tags upstream master
- push all changes in master to rhgit (internal git repository): git push --tags rhgit master
Release: push artifacts to JBoss Nexus Repository
- Assuming your maven settings are correct, do "mvn deploy"
- Login to nexus. Look for the staging repository and your release link.
- Choose the link with your user id.
- Click "Close" and give a description such as "PLFED-297: Release PicketLink 2.1.1.Final"
- That will move the repo artifacts from stage 1 to stage2. We are still not finished releasing the artifacts.
- Now, choose the link again. Press "Release" button and you can give the same description. That is it.!!!
- Choosing "Drop" will delete the link and artifacts. So you can run "mvn deploy" again to fix any issues you may have.
Post Release Tagging
- perl -pi -e 's/2.1.1.Final/2.1.2-SNAPSHOT/g' `find . -name \pom.xml`
- Commit and push
- Check in github whether you have pushed correctly.
You can always verify whether your artifacts are available in JBoss Nexus Public Repo at https://repository.jboss.org/nexus/content/groups/public/org/picketlink/
Update the magnolia pages for PicketLink
Mainly for the download page. (Contact the PicketLink Team Members on this as you will need the magnolia username/pass)
Announce the Release
Blog, User Forum
Spread the word about new release.
- user forum, blog, the core, twitter, G+, #whateveryouareusing
- in case of twitter consider: direct message @JBossNews to get a release pushed on all the social media streams
Deleting the wrong tag
anil@sadbhav:~/github/picketbox-keystore$ git tag -d 2012aug21 Deleted tag '2012aug21' (was 2ea0939) anil@sadbhav:~/github/picketbox-keystore$ git push origin :refs/tags/2012aug21 Enter passphrase for key '/home/anil/.ssh/id_rsa': remote: warning: Deleting a non-existent ref. To email@example.com:anilsaldhana/picketbox-keystore.git - [deleted] 2012aug21 anil@sadbhav:~/github/picketbox-keystore$ git push upstream :refs/tags/2012aug21 Enter passphrase for key '/home/anil/.ssh/id_rsa': To firstname.lastname@example.org:picketbox/picketbox-keystore.git - [deleted] 2012aug21
anil@sadbhav:~/github/picketbox-ldap$ git remote -v show origin email@example.com:anilsaldhana/picketbox-ldap.git (fetch) origin firstname.lastname@example.org:anilsaldhana/picketbox-ldap.git (push) anil@sadbhav:~/github/picketbox-ldap$ git remote add upstream email@example.com:picketbox/picketbox-ldap.git anil@sadbhav:~/github/picketbox-ldap$ git remote -v origin firstname.lastname@example.org:anilsaldhana/picketbox-ldap.git (fetch) origin email@example.com:anilsaldhana/picketbox-ldap.git (push) upstream firstname.lastname@example.org:picketbox/picketbox-ldap.git (fetch) upstream email@example.com:picketbox/picketbox-ldap.git (push) anil@sadbhav:~/github/picketbox-ldap$
Other GIT related resources
If you want to merge two workspaces etc: http://scottwb.com/blog/2012/07/14/merge-git-repositories-and-preseve-commit-history/