Compare commits
13 Commits
1.20.4-4aa
...
1.20.4-2a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a846bf4d4 | ||
|
|
6397d020c4 | ||
|
|
349f9e5d5c | ||
|
|
ef174a74fa | ||
|
|
14a522ea08 | ||
|
|
3f5c5e538e | ||
|
|
a83c72b524 | ||
|
|
6f14faa97a | ||
|
|
7dd69685dc | ||
|
|
f5b16a4008 | ||
|
|
f2ba98ad1f | ||
|
|
07e3a81416 | ||
|
|
6a356d0425 |
@@ -5,22 +5,29 @@ sha256() {
|
|||||||
prop() {
|
prop() {
|
||||||
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
||||||
}
|
}
|
||||||
|
|
||||||
project_id="luminol"
|
project_id="luminol"
|
||||||
mcversion_group=$(prop GroupMCV)
|
mcversion_group=$(prop GroupMCV)
|
||||||
mcversion=$(prop mcVersion)
|
mcversion=$(prop mcVersion)
|
||||||
pre=$(prop preVersion)
|
pre=$(prop preVersion)
|
||||||
|
|
||||||
if [ $pre = "true" ]; then
|
if [ $pre = "true" ]; then
|
||||||
channel="experimental"
|
channel="experimental"
|
||||||
else
|
else
|
||||||
channel="default"
|
channel="default"
|
||||||
fi
|
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_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar`
|
||||||
jar_name="luminol-1.20.4-paperclip.jar"
|
jar_name="luminol-1.20.4-paperclip.jar"
|
||||||
ctime=$(date -u +"%s")"000"
|
ctime=$(date -u +"%s")"000"
|
||||||
|
|
||||||
# v2
|
# v2
|
||||||
echo "Authentication: $secret_v2"
|
echo "Authentication: $secret_v2"
|
||||||
echo "[DEBUG] curl --location -g --request POST "https://api.luminolmc.com/v2/projects/luminol/1.20.4/build/commit?jar_name=luminol-1.20.4-paperclip.jar&release_tag=$tag&changes="$changes"&sha256=$jar_sha256&time=$ctime&channel=$channel&version_group=$mcversion_group" -H "Authorization: $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
|
||||||
# shellcheck disable=SC2031
|
json=$(printf "{\"channel\":\"%s\", \"jar_name\":\"%s\", \"sha256\":\"%s\", \"tag\":\"%s\", \"time\":\"%s\", \"changes\":\"%s\"}" "$channel" "$jar_name" "$jar_sha256" "$tag" "$ctime" "$changes")
|
||||||
curl --location -g --request POST -H "Authorization: $secret_v2" "https://api.luminolmc.com/v2/projects/luminol/1.20.4/build/commit?jar_name=$jar_name&release_tag=$tag&changes=$changes&sha256=$jar_sha256&time=$ctime&channel=$channel&version_group=$mcversion_group"
|
echo "[DEBUG] $json"
|
||||||
|
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