switch month and day ver

This commit is contained in:
Bella 2020-02-22 21:33:24 -05:00
parent 3a4ce60902
commit 75f57b6c31
1 changed files with 4 additions and 4 deletions

8
ver.sh
View File

@ -3,13 +3,13 @@
# Created by S-B99 on 19/02/20 # Created by S-B99 on 19/02/20
# echo "Usage: ./ver.sh v2.0.0 01" # echo "Usage: ./ver.sh v2.0.0 01"
dateD=$(date +'%d')
dateM=$(date +'%m') dateM=$(date +'%m')
dateD=$(date +'%d')
sed -i "s/modVersion=.*/modVersion=$1\-${dateD}\-${dateM}\-$2/" gradle.properties sed -i "s/modVersion=.*/modVersion=$1\-${dateM}\-${dateD}\-$2/" gradle.properties
sed -i "s/MODVER = \".*\";/MODVER = \"$1\-${dateD}\-${dateM}\-$2\";/" src/main/java/me/zeroeightsix/kami/KamiMod.java sed -i "s/MODVER = \".*\";/MODVER = \"$1\-${dateM}\-${dateD}\-$2\";/" src/main/java/me/zeroeightsix/kami/KamiMod.java
sed -i "s/\"version\": \".*\",/\"version\": \"${1:1}\-${dateM}\-${dateD}\-$2\",/" src/main/resources/mcmod.info
sed -i "s/MODVERSMALL = \".*\";/MODVERSMALL = \"$1\-beta\";/" src/main/java/me/zeroeightsix/kami/KamiMod.java sed -i "s/MODVERSMALL = \".*\";/MODVERSMALL = \"$1\-beta\";/" src/main/java/me/zeroeightsix/kami/KamiMod.java
sed -i "s/\"version\": \".*\",/\"version\": \"${1:1}\-${dateD}\-${dateM}\-$2\",/" src/main/resources/mcmod.info
git reset git reset
git add gradle.properties src/main/java/me/zeroeightsix/kami/KamiMod.java src/main/resources/mcmod.info git add gradle.properties src/main/java/me/zeroeightsix/kami/KamiMod.java src/main/resources/mcmod.info