diff --git a/bin/release.sh b/bin/release.sh index bb409bbdb390..403e9d46714b 100644 --- a/bin/release.sh +++ b/bin/release.sh @@ -2,35 +2,16 @@ set -e -# Make sure the release tag is provided. if (( "$#" != 1 )) then - echo "Tag has to be provided." + echo "Tag has to be provided" exit 1 fi -# Make sure the working directory is clear. -if [ -z "$(git status --porcelain)" ]; then - echo "Working directory clean" -else - echo "Your working directory is dirty. Did you forget to commit your changes?" - - exit 1 -fi - -RELEASE_BRANCH="6.x" -CURRENT_BRANCH=$(git branch --show-current) +CURRENT_BRANCH="6.x" VERSION=$1 -# Make sure current branch and release branch match. -if (( $RELEASE_BRANCH != $CURRENT_BRANCH )) -then - echo "Release branch ($RELEASE_BRANCH) does not matches the current active branch ($CURRENT_BRANCH)." - - exit 1 -fi - # Always prepend with "v" if [[ $VERSION != v* ]] then @@ -38,7 +19,6 @@ then fi # Tag Framework -git pull git tag $VERSION git push origin --tags @@ -59,7 +39,7 @@ do cd $TMP_DIR; git clone $REMOTE_URL . - git checkout "$RELEASE_BRANCH"; + git checkout "$CURRENT_BRANCH"; git tag $VERSION git push origin --tags