release-sr 1000 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/bash

git fetch

git checkout 1.0
git reset origin/1.0 --hard

# for now this script is hardcoded to release on 1.0.x versions intentionally
# update to version 2 or 1.1 would require a major reorganisation on the release
# process
CURRENT_VERSION=`git tag | grep "^1\+\.0\+\.[0-9]\+$" | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -1`

NEXT_MINOR_VERSION=$((`echo $CURRENT_VERSION | cut -f3 -d.`+1))

echo "###################################################################"
echo "You are about to release a new version of SlapOS Software Release"
echo "Lastest release: $CURRENT_VERSION"
echo "Next Release to be Tagged: 1.0.$NEXT_MINOR_VERSION"
echo "###################################################################"

git tag 1.0.$NEXT_MINOR_VERSION -m "Release 1.0.$NEXT_MINOR_VERSION"


Łukasz Nowak's avatar
Łukasz Nowak committed
24
echo " Please review current tag and then push it:"
25 26 27 28 29
echo " To review use git log 1.0.$NEXT_MINOR_VERSION"

echo ""
echo " To push into main repository:"
echo " git push origin 1.0.$NEXT_MINOR_VERSION"