update
This commit is contained in:
@@ -16,7 +16,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"
|
||||
@@ -24,7 +24,10 @@ ctime=$(date -u +"%s")"000"
|
||||
# v2
|
||||
echo "Authentication: $secret_v2"
|
||||
#echo "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}" > data.json
|
||||
printf "{\"channel\":\"%s\", \"jar_name\":\"%s\", \"sha256\":\"%s\", \"tag\":\"%s\", \"time\":\"%s\", \"changes\":\"%s\"}" "$channel" "$jar_name" "$jar_sha256" "$tag" "$ctime" "$changes" > data
|
||||
json = `cat data`
|
||||
json=$(printf "{\"channel\":\"%s\", \"jar_name\":\"%s\", \"sha256\":\"%s\", \"tag\":\"%s\", \"time\":\"%s\", \"changes\":\"%s\"}" "$channel" "$jar_name" "$jar_sha256" "$tag" "$ctime" "$changes")
|
||||
echo "[DEBUG] $json"
|
||||
curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" -d @data
|
||||
response=$(curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: $secret_v2" \
|
||||
-d "$json")
|
||||
echo "[RESPONSE] $response"
|
||||
|
||||
Reference in New Issue
Block a user