bin/bump-version.sh in docman-0.0.62 vs bin/bump-version.sh in docman-0.0.63
- old
+ new
@@ -26,14 +26,20 @@
echo "Current version : $BASE_STRING"
#V_MINOR=$((V_MINOR + 1))
V_PATCH=$((V_PATCH + 1))
#V_PATCH=0
SUGGESTED_VERSION="$V_MAJOR.$V_MINOR.$V_PATCH"
- read -p "Enter a version number [$SUGGESTED_VERSION]: " INPUT_STRING
- if [ "$INPUT_STRING" = "" ]; then
+
+ if [ -n "$2" ] && [ "$2" == "next" ]; then
INPUT_STRING=$SUGGESTED_VERSION
+ else
+ read -p "Enter a version number [$SUGGESTED_VERSION]: " INPUT_STRING
+ if [ "$INPUT_STRING" = "" ]; then
+ INPUT_STRING=$SUGGESTED_VERSION
+ fi
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
@@ -83,10 +89,10 @@
git clean -f -d
fi
echo "type: tag" > info.yaml
echo "version: $TAG" >> info.yaml
git add info.yaml
- if [ -n "$2" ] && [ "$2" == "skip" ]; then
+ if [ -n "$3" ] && [ "$3" == "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