Files
QuickShop-Reremake/upload2bukkit.sh
T
Ghost_chu 6db26f69e8 Fix the travis-ci script
Former-commit-id: fb2bfc05fcae5b8d1f63b7d9a257b633242d76e2 [formerly 783e8f188097fdcd3dab388008e1623a0305c839]
Former-commit-id: bcf3faa1c1fa70aa2a436bfe2bcc5568991627c5
2019-06-07 22:19:53 +08:00

22 lines
661 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