9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00

Update build action

This commit is contained in:
violetc
2022-09-14 08:59:51 +00:00
parent 5c776b8a25
commit 30daf0517c
2 changed files with 26 additions and 2 deletions

24
scripts/GetReleaseInfo.sh Normal file
View File

@@ -0,0 +1,24 @@
sha1() {
sha1sum $1 | awk '{print $1}'
}
md5() {
md5sum $1 | awk '{print $1}'
}
tagid="1.19.2-`git log --pretty='%h' -1`"
echo "Leaves-$tagid [![download](https://img.shields.io/github/downloads/LeavesMC/Leaves/$tagid/total?color=0)](https://github.com/Leaves/LeavesMC/releases/download/$tagid/leaves-1.19.2.jar)" >> releaseinfo.md
echo "=====" >> releaseinfo.md
echo "" >> releaseinfo.md
echo "### Commit Message" >> releaseinfo.md
number=$(git log --oneline master ^`git describe --tags --abbrev=0` | wc -l)
echo `git log --pretty='> [%h] %s' -$number` >> releaseinfo.md
echo "" >> releaseinfo.md
echo "### Checksum" >> releaseinfo.md
echo "| File | leaves-1.19.2.jar |" >> releaseinfo.md
echo "| ---- | ---- |" >> releaseinfo.md
echo "| MD5 | `md5 "leaves-1.19.2.jar"` |" >> releaseinfo.md
echo "| SHA1 | `sha1 "leaves-1.19.2.jar"` |" >> releaseinfo.md