trim commit hash to first 7

This commit is contained in:
Bella 2020-03-10 19:45:10 -04:00
parent bf6cd57c3b
commit 3ec66845f4
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
CUR_VER="$(cat ./scripts/curVer)"
sed -i "s/modVersion=.*/modVersion=${CUR_VER:1}-$TRAVIS_COMMIT/" gradle.properties
sed -i "s/\"version\": \".*\",/\"version\": \"${CUR_VER:1}-$TRAVIS_COMMIT\",/" src/main/resources/mcmod.info
COMMIT_TRIM="${TRAVIS_COMMIT::33}"
sed -i "s/modVersion=.*/modVersion=${CUR_VER:1}-$COMMIT_TRIM/" gradle.properties
sed -i "s/\"version\": \".*\",/\"version\": \"${CUR_VER:1}-$COMMIT_TRIM\",/" src/main/resources/mcmod.info