mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
1.20.6 (#216)
--------- Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com> Co-authored-by: Bluemangoo <chenfy2006@qq.com>
This commit is contained in:
14
scripts/GetBuildNumber.sh
Normal file
14
scripts/GetBuildNumber.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
prop() {
|
||||
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
||||
}
|
||||
|
||||
latest_build=$(curl -s https://api.leavesmc.org/v2/projects/leaves/versions/$(prop mcVersion)/latestGroupBuildId)
|
||||
|
||||
if [[ $latest_build =~ ^[0-9]+$ ]]; then
|
||||
echo "BUILD_NUMBER=$((latest_build + 1))" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Error: Received non-integer value from API: $latest_build"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,3 +1,7 @@
|
||||
sha256() {
|
||||
sha256sum $1 | awk '{print $1}'
|
||||
}
|
||||
|
||||
sha1() {
|
||||
sha1sum $1 | awk '{print $1}'
|
||||
}
|
||||
@@ -52,6 +56,7 @@ echo "| File | $jarName |" >> $releaseinfo
|
||||
echo "| ---- | ---- |" >> $releaseinfo
|
||||
echo "| MD5 | `md5 $jarName` |" >> $releaseinfo
|
||||
echo "| SHA1 | `sha1 $jarName` |" >> $releaseinfo
|
||||
echo "| SHA256 | `sha256 $jarName` |" >> $releaseinfo
|
||||
|
||||
echo -n "{\"content\":\"Leaves New Release\",\"embeds\":[{\"title\":\"$leavesid\",\"url\":\"https://github.com/LeavesMC/Leaves/releases/tag/$tagid\",\"fields\":[{\"name\":\"Changelog\",\"value\":\"" >> $discordmes
|
||||
echo -n $(git log --oneline --pretty='> [%h] %s\\n' -$number) >> $discordmes
|
||||
|
||||
Reference in New Issue
Block a user