mirror of https://github.com/kami-blue/client
added separate github upload script
This commit is contained in:
parent
fcfb27a60d
commit
d6bde97c68
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Separate upload script to run in case the first fails
|
||||
|
||||
cd ~/kamiblue
|
||||
|
||||
CUR_VER="$(tail -c +2 ./scripts/curVer)"
|
||||
COMMIT_TRIM="$(git log --format=%h -1)"
|
||||
|
||||
# Find the release file and rename it to kamiblue-version-commit-release.jar
|
||||
BUILD_DIR=$HOME/kamiblue/build/libs/
|
||||
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
|
||||
|
||||
./gradlew build
|
||||
|
||||
# delete the release in case it exists
|
||||
git tag -d $CUR_VER-$COMMIT_TRIM
|
||||
git push origin :refs/tags/$CUR_VER-$COMMIT_TRIM
|
||||
|
||||
# Upload the release
|
||||
cd ~/
|
||||
source ~/.profile
|
||||
./github-release-linux-amd64 $CUR_VER-$COMMIT_TRIM $BUILD_DIR/$JAR_DIR --commit master --tag $CUR_VER-$COMMIT_TRIM --github-repository $GITHUB_RELEASE_REPOSITORY --github-access-token $GITHUB_RELEASE_ACCESS_TOKEN
|
Loading…
Reference in New Issue