From 763f087788963db0b2ff5320ac827512b8e13b86 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Fri, 3 May 2019 16:29:07 +0800 Subject: [PATCH] Improve auto upload script Former-commit-id: 71c815712652dfc4ce691eb904214412263b044e [formerly fe67049c1089bbbf902134cece1bccc6a72e3ae3] Former-commit-id: e1e2829bc997fcd84a26aed9a9c98339a6bf2961 --- depoly.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/depoly.sh b/depoly.sh index f39e6ec09..90bba7a44 100644 --- a/depoly.sh +++ b/depoly.sh @@ -10,23 +10,12 @@ then exit 1 fi -# 定义变量count,其值为0 -count=0 - -# 下载JSON库 -# wget -O "jq" "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" - -# 设置运行权限 -chmod +x "./jq" - # JAR为编译后jar文件名称 read JAR < $filename xToken=$1 -curl -X POST -H "X-Api-Token: $xToken" -F 'metadata={"changelog":"Auto upload by TravisCI, see update details on spigotmc.org","gameVersions":[7330,7105],"releaseType":"alpha"}' -F "file=@./push/$JAR" -s "https://dev.bukkit.org/api/projects/320536/upload-file" > fileid.json +curl -X POST -H "X-Api-Token: $xToken" -F 'metadata={"changelog":"Auto upload by TravisCI, see update details on spigotmc.org","gameVersions":[7330,7105],"releaseType":"release"}' -F "file=@./push/$JAR" -s "https://dev.bukkit.org/api/projects/320536/upload-file" > fileid.json cat fileid.json -# jq '.id' > fileid.txt -# cat fileid.txt -echo -e "\nTotal $count linces read and deployed." +echo "Finished upload to dev.bukkit.org." #退出脚本,且退出状态码为0 exit 0