bin/bump-version.sh in docman-0.0.14 vs bin/bump-version.sh in docman-0.0.15
- old
+ new
@@ -27,10 +27,11 @@
if [ "$INPUT_STRING" = "" ]; then
INPUT_STRING=$SUGGESTED_VERSION
fi
echo "Will set new version to be $INPUT_STRING"
echo $INPUT_STRING > VERSION
+ TAG=${INPUT_STRING}
echo "Version $INPUT_STRING:" > tmpfile
git log --pretty=format:" - %s" "$BASE_STRING"...HEAD >> tmpfile
echo "" >> tmpfile
echo "" >> tmpfile
cat CHANGES >> tmpfile
@@ -58,7 +59,23 @@
git commit -m "Added VERSION and CHANGES files, Version bump to 0.1.0"
git tag -a -m "Tagging version 0.1.0" "0.1.0"
git push origin --tags
git push
fi
-
+ TAG="0.1.0"
+fi
+
+if [ -n "$1" ]; then
+ BRANCH="state_$1"
+ git show-ref --verify --quiet "refs/heads/${BRANCH}"
+ if [ $? == 0 ]; then
+ git checkout ${BRANCH}
+ else
+ git checkout -b ${BRANCH}
+ fi
+ echo "type: tag" > info.yaml
+ echo "version: $TAG" >> info.yaml
+ git add -A
+ git commit -m "Changed tag to: $TAG" & git push origin ${BRANCH}
+ git checkout -
+ echo ${TAG}
fi