]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - upload.sh
Fix memory bug at shutdown
[dragonblocks_alpha.git] / upload.sh
index 214981bf435c53007ba6c259a3e50b0ad075e219..62e17860fed9bf08dd9260684be6399b661e164e 100755 (executable)
--- a/upload.sh
+++ b/upload.sh
@@ -1,18 +1,22 @@
 #!/bin/bash
-echo "Snapshot uploading temporarily disabled"
-exit
+set -e
 
-VERSION=`git tag --points-at HEAD`
-IS_RELEASE="1"
-if [[ $VERSION = "" ]]; then
-       VERSION=`git rev-parse --short HEAD`
-       IS_RELEASE="0"
+name="$(git describe --tags)"
+path="@snapshot/dragonblocks_alpha-$name"
+ref="$(git tag --points-at HEAD)"
+release="1"
+
+if [[ "$ref" == "" ]]; then
+       ref="$(git rev-parse --short HEAD)"
+       release="0"
 fi
 
 curl -f -i -X POST -H "Content-Type: multipart/form-data" \
        -F "secret=$SECRET" \
-       -F "name=$VERSION" \
-       -F "is_release=$IS_RELEASE" \
-       -F "ubuntu=@dragonblocks_alpha-$VERSION.zip" \
-       -F "windows=@dragonblocks_alpha-win64-$VERSION.zip" \
+       -F "name=$name" \
+       -F "ref=$ref" \
+       -F "release=$release" \
+       -F "Linux=$path.zip" \
+       -F "Win32=$path-win32.zip" \
+       -F "Win64=$path-win64.zip" \
        https://elidragon.tk/dragonblocks_alpha/upload.php