-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Capuccino
committed
Sep 27, 2018
1 parent
de945d7
commit 6b58107
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
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 |