kami-blue/ver.sh

17 lines
712 B
Bash
Raw Normal View History

2020-02-20 01:06:32 +00:00
#!/bin/sh
# Created by S-B99 on 19/02/20
# echo "Usage: ./ver.sh v2.0.0 01"
dateM=$(date +'%m')
2020-02-23 02:33:24 +00:00
dateD=$(date +'%d')
2020-02-20 01:06:32 +00:00
2020-02-23 02:33:24 +00:00
sed -i "s/modVersion=.*/modVersion=$1\-${dateM}\-${dateD}\-$2/" gradle.properties
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
2020-02-21 21:21:21 +00:00
sed -i "s/MODVERSMALL = \".*\";/MODVERSMALL = \"$1\-beta\";/" src/main/java/me/zeroeightsix/kami/KamiMod.java
2020-02-20 01:06:32 +00:00
git reset
git add gradle.properties src/main/java/me/zeroeightsix/kami/KamiMod.java src/main/resources/mcmod.info
2020-02-22 03:43:02 +00:00
git commit -m "[BOT] New beta: $1-${dateD}-${dateM}-$2"