Compare commits

...

5 Commits

Author SHA1 Message Date
494afed4ae Actually push commits 2022-10-10 22:03:07 -05:00
b12902183d Unique release tag 2022-10-10 22:01:36 -05:00
f3822c32f2 Publish release 2022-10-10 21:56:38 -05:00
8c5004c24d reformat curl 2022-10-10 21:51:34 -05:00
fb7544fe98 fix release script 2022-10-10 21:50:47 -05:00

View File

@ -1,21 +1,22 @@
#!/bin/bash
set -xeuo pipefail
set -x
TOKEN=$(< token.txt)
git commit -a
EDITOR=nano git commit -a
git push
COMMIT=$(git log | head -n 1 | cut -d' ' -f2)
echo $COMMIT
export PATH=$PATH:"C:\Program Files\7-Zip"
DATE=$(date +%s)
7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/*
DATA='{
"body": "Autogenerated release",
"draft": true,
"draft": false,
"name": "Development release",
"prerelease": true,
"tag_name": "testing",
"tag_name": "'$DATE'",
"target_commitish": "'$COMMIT'"
}'
OUT=$(curl -X 'POST' \
@ -26,9 +27,12 @@ OUT=$(curl -X 'POST' \
ID=$(echo $OUT | cut -d',' -f 1 | cut -d':' -f 2)
OUT=curl -X 'POST' \
OUT=$(curl -X 'POST' \
'https://git.deck.sh/api/v1/repos/Interfaz/ff/releases/'$ID'/assets?token='$TOKEN'' \
-H 'accept: application/json' \
-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)
echo $URL
rm release-$COMMIT.zip