From f5b16a4008fa8b1d17b4d2d2c04db1c4f5c71ebe Mon Sep 17 00:00:00 2001 From: Klop233 <3337913379@qq.com> Date: Fri, 12 Apr 2024 23:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9D=E5=AF=B9=E6=B2=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/PushToAPI.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh index 9bee561..8c4b458 100644 --- a/scripts/PushToAPI.sh +++ b/scripts/PushToAPI.sh @@ -15,7 +15,7 @@ if [ $pre = "true" ]; then else channel="default" fi -changes=$(git log -1 --pretty='[{\"commit\": \"%H\", \"message\": \"%s\", \"summary\": \"%b\"}]') +changes=$(git log -1 --pretty="[{'commit': '%H', 'message': '%s', 'summary': '%b'}]") jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar` jar_name="luminol-1.20.4-paperclip.jar" ctime=$(date -u +"%s")"000" @@ -23,4 +23,4 @@ ctime=$(date -u +"%s")"000" # v2 echo "Authentication: $secret_v2" echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"" -curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" +curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw '{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}'