mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Former-commit-id: d396580b56cdace0a61d5e4b2792d1006116b94a [formerly c04515c5b34469b2f1b214d0c7b4a49e8ceb7e36] Former-commit-id: 48427d5c8125abbe77d7ffb9d7657a719c4e0ed6
22 lines
661 B
Bash
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
|