bin/bump-version.sh in docman-0.0.26 vs bin/bump-version.sh in docman-0.0.27
- old
+ new
@@ -18,12 +18,13 @@
BASE_LIST=(`echo $BASE_STRING | tr '.' ' '`)
V_MAJOR=${BASE_LIST[0]}
V_MINOR=${BASE_LIST[1]}
V_PATCH=${BASE_LIST[2]}
echo "Current version : $BASE_STRING"
- V_MINOR=$((V_MINOR + 1))
- V_PATCH=0
+ #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
INPUT_STRING=$SUGGESTED_VERSION
fi
@@ -35,11 +36,11 @@
echo "" >> tmpfile
echo "" >> tmpfile
cat CHANGES >> tmpfile
mv tmpfile CHANGES
git add CHANGES VERSION
- git commit -m "Version bump to $INPUT_STRING"
+ git commit -m "[skip] Version bump to $INPUT_STRING"
git tag -a -m "Tagging version $INPUT_STRING" "$INPUT_STRING"
git push origin --tags
git push
else
echo "Could not find a VERSION file"
@@ -54,12 +55,12 @@
echo "Version 0.1.0" > CHANGES
git log --pretty=format:" - %s" >> CHANGES
echo "" >> CHANGES
echo "" >> CHANGES
git add VERSION CHANGES
- git commit -m "Added VERSION and CHANGES files, Version bump to 0.1.0"
- git tag -a -m "[skip] Tagging version 0.1.0" "0.1.0"
+ git commit -m "[skip] 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
@@ -67,17 +68,18 @@
if [ -n "$1" ]; then
BRANCH="state_$1"
git show-ref --verify --quiet "refs/heads/${BRANCH}"
if [ $? == 0 ]; then
git checkout ${BRANCH}
+ git pull
else
git checkout --orphan ${BRANCH}
git rm --cached -r .
git clean -f -d
fi
echo "type: tag" > info.yaml
echo "version: $TAG" >> info.yaml
git add -A
- git commit -m "[skip] Changed tag to: $TAG" & git push -u origin ${BRANCH}
- #git checkout -
+ git commit -m "Changed tag to: $TAG" & git push -u origin ${BRANCH}
+ git checkout master
echo ${TAG}
fi