bin/bump-version.sh in docman-0.0.33 vs bin/bump-version.sh in docman-0.0.34
- old
+ new
@@ -10,11 +10,12 @@
# once the new version number is determined, the script will
# pull a list of changes from git history, prepend this to
# a file called CHANGES (under the title of the new version
# number) and create a GIT tag.
-
+set -vx
+
if [ -f VERSION ]; then
BASE_STRING=`cat VERSION`
BASE_LIST=(`echo $BASE_STRING | tr '.' ' '`)
V_MAJOR=${BASE_LIST[0]}
V_MINOR=${BASE_LIST[1]}
@@ -38,11 +39,11 @@
cat CHANGES >> tmpfile
mv tmpfile CHANGES
git add CHANGES VERSION
git commit -m "[skip] Version bump to $INPUT_STRING"
git tag -a -m "[skip] Tagging version $INPUT_STRING" "$INPUT_STRING"
- git push origin --tags
+ git push origin ${INPUT_STRING}
git push
else
echo "Could not find a VERSION file"
read -p "Do you want to create a version file and start from scratch? [y]" RESPONSE
if [ "$RESPONSE" = "" ]; then RESPONSE="y"; fi
@@ -79,9 +80,13 @@
git clean -f -d
fi
echo "type: tag" > info.yaml
echo "version: $TAG" >> info.yaml
git add -A
- git commit -m "Changed tag to: $TAG" & git push -u origin ${BRANCH}
+ if [ -n "$2" ] && [ "$2" == "skip" ]; then
+ git commit -m "[skip] Changed tag to: $TAG" & git push -u origin ${BRANCH}
+ else
+ git commit -m "Changed tag to: $TAG" & git push -u origin ${BRANCH}
+ fi
git checkout master
echo ${TAG}
fi