Files
QuickShop-Reremake/deploy.sh
T
Ghost_chu bfe3447901 fix some command bugs
Former-commit-id: 8c0cb65b20d69148c687c45a9bb9a0d454433c6c [formerly 4cf4d203053c2ad3415d22de1d3574b50058c7c8]
Former-commit-id: c5b294bb0f979842638a49d99d87352d6cb41441
2019-06-14 22:12:16 +08:00

23 lines
664 B
Bash

#!/bin/sh
echo "Deploy jar to dev.bukkit.org"
# 获取从install完成后输出的JAR文件的名字
filename="./jarname.txt"
if [[ ! -f $filename ]]
then
echo "The file $filename doesn't exist."
exit 1
fi
# 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":"release"}' -F "file=@./push/$JAR" -s "https://dev.bukkit.org/api/projects/320536/upload-file" > fileid.json
cat fileid.json
echo "Finished upload to dev.bukkit.org."
#退出脚本,且退出状态码为0
exit 0