Skip to content

Commit

Permalink
Add upload script
Browse files Browse the repository at this point in the history
  • Loading branch information
LionZXY committed May 11, 2019
1 parent 1b85506 commit a357ce7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,5 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

!Hasher.jar
Binary file added scripts/Hasher.jar
Binary file not shown.
15 changes: 15 additions & 0 deletions scripts/upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

cd ../

./gradlew fatJar

JARPATH=build/libs/TechnoparkLauncher-1.0-SNAPSHOT.jar
SHA256=$(java -jar scripts/Hasher.jar $JARPATH)
VERSION="1.2.$(date +%s)"

rm launcher.json
JSON=$(jo version="$VERSION" downloadFullPath="https://minecraft.glitchless.ru/$VERSION.jar" SHA-256="$SHA256")
echo ${JSON} >> launcher.json
scp ${JARPATH} [email protected]:/var/www/html/${VERSION}.jar
scp launcher.json [email protected]:/var/www/html/launcher.json

0 comments on commit a357ce7

Please sign in to comment.