fixed release.sh to work on tags
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d2a800d3 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d2a800d3 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d2a800d3 Branch: refs/heads/0.9.x Commit: d2a800d3a585825be33b87999f35615e2f6d3187 Parents: 7593102 Author: Rafael Schloming <[email protected]> Authored: Tue Mar 31 05:05:51 2015 -0400 Committer: Rafael Schloming <[email protected]> Committed: Tue Mar 31 05:06:54 2015 -0400 ---------------------------------------------------------------------- bin/release.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d2a800d3/bin/release.sh ---------------------------------------------------------------------- diff --git a/bin/release.sh b/bin/release.sh index 68def92..984d7d5 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -51,9 +51,13 @@ die() if [ -n "$(git status -uno --porcelain)" ]; then die must release from a clean checkout fi - BRANCH=$(git symbolic-ref --short HEAD) - REMOTE=$(git config branch.${BRANCH}.remote) - git checkout --detach ${REMOTE}/${BRANCH} + BRANCH=$(git symbolic-ref -q --short HEAD) + if [ -n "${BRANCH}" ]; then + REMOTE=$(git config branch.${BRANCH}.remote) + git checkout --detach ${REMOTE}/${BRANCH} + else + REMOTE="origin" + fi bin/version.sh $VERSION git commit -a -m "Release $VERSION" git tag -m "Release $VERSION" $VERSION --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
