mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Migrate PR build storage from transfer.sh to Gofile.io (#916)
This commit is contained in:
@@ -5,9 +5,18 @@ uploadFile()
|
|||||||
{
|
{
|
||||||
FILE=$1
|
FILE=$1
|
||||||
BASENAME="$(basename "${FILE}")"
|
BASENAME="$(basename "${FILE}")"
|
||||||
|
# get available server from gofile api
|
||||||
|
server=$(curl https://apiv2.gofile.io/getServer |cut -d "," -f 2 | cut -d "\"" -f 6)
|
||||||
# abort if it takes more than two minutes to upload
|
# abort if it takes more than two minutes to upload
|
||||||
uploadedTo=`curl -m 120 --upload-file $FILE "https://transfer.sh/$BASENAME"`
|
uploadedTo=$(curl -m 120 -F "email=stash@stashapp.cc" -F "file=@$FILE" "https://$server.gofile.io/uploadFile")
|
||||||
echo "$BASENAME uploaded to url: $uploadedTo"
|
resp=$(echo "$uploadedTo" | cut -d "\"" -f 4)
|
||||||
|
if [ $resp = "ok" ] ; then
|
||||||
|
URL=$(echo "$uploadedTo"|cut -d "," -f 2 | cut -d "\"" -f 6)
|
||||||
|
echo "$BASENAME uploaded to url: \"https://gofile.io/d/$URL\""
|
||||||
|
fi
|
||||||
|
# print an extra newline
|
||||||
|
echo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadFile "dist/stash-osx"
|
uploadFile "dist/stash-osx"
|
||||||
|
|||||||
Reference in New Issue
Block a user