1
0
mirror of https://github.com/kami-blue/client synced 2024-12-22 07:01:01 +00:00
kami-blue/scripts/ver.sh
2020-02-27 12:07:23 -05:00

17 lines
712 B
Bash
Executable File

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