Skip to content

Commit

Permalink
make it more uwu
Browse files Browse the repository at this point in the history
  • Loading branch information
Capuccino committed Sep 27, 2018
1 parent de945d7 commit 6b58107
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions inject_version.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/sh

if [ ! -z TRAVIS_TAG ]; then
# You find yourself in a strange place. This is where we inject semvering via Git Tags
# No need to change anything below the replacer variable.
# Just change the value of replacer, the script will do everything for you

replacer="0.1.2"

if [ ! -z $TRAVIS_TAG ]; then
echo " ---> Tag exists, using tag."
sed -i "s/define config.version = \"0.1.2\"/define config.version = \"$TRAVIS_TAG\"/g" mod/game/options.rpy;
sed -i "s/define config.version = \"$replacer\"/define config.version = \"$TRAVIS_TAG\"/g" mod/game/options.rpy;
cat mod/game/options.rpy | grep config.version;
else
echo " ---> Tag not exists, using hash."
sed -i "s/config.version = \"0.1.2\"/config.version = \"$TRAVIS_COMMIT\"/g" mod/game/options.rpy;
sed -i "s/config.version = \"$replacer\"/config.version = \"$TRAVIS_COMMIT\"/g" mod/game/options.rpy;
cat mod/game/options.rpy | grep config.version;
fi

0 comments on commit 6b58107

Please sign in to comment.