9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
---------

Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com>
Co-authored-by: Fortern <blueten.ki@gmail.com>
Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com>
Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
This commit is contained in:
Lumine1909
2025-06-05 18:41:51 +08:00
committed by GitHub
parent f553c53e42
commit f09fbb247d
379 changed files with 6930 additions and 6288 deletions

View File

@@ -5,22 +5,21 @@ sha256() {
prop() {
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
}
# shellcheck disable=SC2154
echo "$tag"
project_id="leaves"
project_name="leaves"
mcversion=$(prop mcVersion)
ctime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
pre=$(prop preVersion)
if [ $pre = "true" ]; then
if [ "$(prop preVersion)" = "true" ]; then
channel="experimental"
else
channel="default"
fi
promoted=false
number=$(git log --oneline master ^`git describe --tags --abbrev=0` | wc -l)
number=$(git log --oneline master ^"$(git describe --tags --abbrev=0)" | wc -l)
changes=$(git log --pretty='%H<<<%s>>>' -"$number" | sed ':a;N;$!ba;s/\n//g')
jar_name="leaves-$mcversion.jar"
jar_sha256=`sha256 $jar_name`
jar_sha256=$(sha256 "$jar_name")
# shellcheck disable=SC2154
curl --location --request POST "https://api.leavesmc.org/v2/commit/build" --header "Content-Type: application/json" --header "Authentication: Bearer $secret_v2" --data-raw "{\"project_id\":\"$project_id\",\"version\":\"$mcversion\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"tag\":\"$tag\"}"