mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
* init 1.21.4, and boom! * build change, but weight not work * just work * Build changes, and delete timings * Fix API patches (#406) * Fix API patches * merge --------- Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> * 0006/0129 * 0009/0129 * 0011/0129 * 0018/0129 * 0030/0129 * 0035/0129 * 0043/0129 * 0048/0129 * 0049/0129 * 0057/0129 * 0065/0129 * 0086/0129 (#408) * 0072/0129 * 0080/0129 * Readd patch infos * 0086/0129 * Delete applied patches * 0087/0129 * 0091/0129 * 0097/0129 * 0101/0129 * 102/129 * 0107/0129 * 0112/0129 * 0118/0129 * 0129/0129, 100% patched * fix some * server work * Protocol... (#409) * Jade v7 * Fix changed part for Jade * Formatting imports, add Lms Paster protocol * REI payloads 5/8 * Add REI support, remove unnecessary content in Jade * Rename * Make jade better * Make action work * fix action jar * Fix some protocol * Fix bot action, and entity tickCount * Fix Warden GameEventListener register on load * Fix extra Raider drop * Fix grindstone overstacking * Update Paper, and some doc * Merge * [ci skip] Update Action --------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
74 lines
2.1 KiB
Bash
74 lines
2.1 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
sha256() {
|
|
sha256sum "$1" | awk '{print $1}'
|
|
}
|
|
|
|
sha1() {
|
|
sha1sum "$1" | awk '{print $1}'
|
|
}
|
|
|
|
md5() {
|
|
md5sum "$1" | awk '{print $1}'
|
|
}
|
|
|
|
prop() {
|
|
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
|
}
|
|
|
|
commitid=$(git log --pretty='%h' -1)
|
|
mcversion=$(prop mcVersion)
|
|
gradleVersion=$(prop version)
|
|
preVersion=$(prop preVersion)
|
|
tagid="$mcversion-$BUILD_NUMBER-$commitid"
|
|
jarName="leaves-$mcversion.jar"
|
|
leavesid="Leaves-$tagid"
|
|
releaseinfo="releaseinfo.md"
|
|
discordmes="discordmes.json"
|
|
make_latest=$([ "$preVersion" = "true" ] && echo "false" || echo "true")
|
|
|
|
rm -f $discordmes
|
|
rm -f $releaseinfo
|
|
|
|
mv leaves-server/build/libs/leaves-leavesclip-"$gradleVersion"-mojmap.jar "$jarName"
|
|
{
|
|
echo "name=$leavesid"
|
|
echo "tag=$tagid"
|
|
echo "jar=$jarName"
|
|
echo "info=$releaseinfo"
|
|
echo "discordmes=$discordmes"
|
|
echo "pre=$preVersion"
|
|
echo "make_latest=$make_latest"
|
|
} >> "$GITHUB_ENV"
|
|
|
|
{
|
|
echo "$leavesid [](https://github.com/LeavesMC/Leaves/releases/download/$tagid/$jarName)"
|
|
echo "====="
|
|
echo ""
|
|
if [ "$preVersion" = "true" ]; then
|
|
echo "> This is an early, experimental build. It is only recommended for usage on test servers and should be used with caution."
|
|
echo "> **Backups are mandatory!**"
|
|
echo ""
|
|
fi
|
|
echo "### Commit Message"
|
|
} >> $releaseinfo
|
|
|
|
number=$(git log --oneline master ^"$(git describe --tags --abbrev=0)" | wc -l)
|
|
git log --pretty='> [%h] %s' "-$number" >> $releaseinfo
|
|
|
|
{
|
|
echo ""
|
|
echo "### Checksum"
|
|
echo "| File | $jarName |"
|
|
echo "| ---- | ---- |"
|
|
echo "| MD5 | $(md5 "$jarName") |"
|
|
echo "| SHA1 | $(sha1 "$jarName") |"
|
|
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\":\""
|
|
# shellcheck disable=SC2046
|
|
echo -n $(git log --oneline --pretty='> [%h] %s\\n' "-$number")
|
|
echo "\",\"inline\":true}]}]}"
|
|
} >> $discordmes |