Fix branch tag for release

formac
Cole Deck 2 years ago
parent 494afed4ae
commit 0a55b3ae8c

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
set -x #set -x
TOKEN=$(< token.txt) TOKEN=$(< token.txt)
EDITOR=nano git commit -a EDITOR=nano git commit -a
@ -8,7 +8,7 @@ git push
COMMIT=$(git log | head -n 1 | cut -d' ' -f2) COMMIT=$(git log | head -n 1 | cut -d' ' -f2)
echo $COMMIT echo $COMMIT
export PATH=$PATH:"C:\Program Files\7-Zip" export PATH=$PATH:"C:\Program Files\7-Zip"
DATE=$(date +%s) TAG="testing"
7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/* 7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/*
DATA='{ DATA='{
@ -16,7 +16,7 @@ DATA='{
"draft": false, "draft": false,
"name": "Development release", "name": "Development release",
"prerelease": true, "prerelease": true,
"tag_name": "'$DATE'", "tag_name": "'$TAG'",
"target_commitish": "'$COMMIT'" "target_commitish": "'$COMMIT'"
}' }'
OUT=$(curl -X 'POST' \ OUT=$(curl -X 'POST' \
@ -33,6 +33,6 @@ OUT=$(curl -X 'POST' \
-H 'Content-Type: multipart/form-data' \ -H 'Content-Type: multipart/form-data' \
-F 'attachment=@'release-$COMMIT.zip';type=application/x-zip-compressed') -F 'attachment=@'release-$COMMIT.zip';type=application/x-zip-compressed')
URL=$(echo $OUT | cut -d',' -f 6 | cut -d\" -f4) URL=$(echo $OUT | cut -d',' -f 7# | cut -d\" -f4)
echo $URL echo $URL
rm release-$COMMIT.zip rm release-$COMMIT.zip
Loading…
Cancel
Save