Last active
August 29, 2015 13:59
-
-
Save mithereal/10943966 to your computer and use it in GitHub Desktop.
chicago boss version commit hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### get version | |
VER=$(cat src/*.app.src | grep -Po 'appver."[0-9]*\.[0-9]*\.[0-9]"' | grep -Po '[0-9]*\.[0-9]*\.[0-9]') | |
VER_ARRAY=(`echo $VER | tr "." "\n"`) | |
echo "Type of Release: Maj(j), Min(m), Patch(p) (blank skips release tag)" | |
read type | |
if ["$type" == "j"] | |
then | |
basever="$VER_ARRAY[0]" | |
incver=$basever + 1 | |
#implode array | |
version= #implode array | |
fi | |
if ["$type" == "m"] | |
then | |
basever="$VER_ARRAY[1]" | |
incver=$basever + 1 | |
version= #implode array | |
fi | |
if ["$type" == "p"] | |
then | |
basever="$VER_ARRAY[2]" | |
incver=$basever + 1 | |
version= #implode array | |
fi | |
regex='s/appver."[0-9]*\.[0-9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment