ci: cleanup build job, follow old release naming

This commit is contained in:
鲁树人
2025-05-08 06:36:33 +09:00
parent 17cde2a1a5
commit 896ace49fd
4 changed files with 44 additions and 425 deletions

34
misc/repack.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# see .gitea/workflows/build.yml
APP_VERSION="${1:-$(git describe --tags --always)}"
for exe in prepare/*/um-*.exe; do
name="$(basename "$exe" .exe)-$APP_VERSION"
new_exe="$(dirname "$exe")/um.exe"
mv "$exe" "$new_exe"
zip -9 -j "dist/${name}.zip" "$new_exe"
rm -f "$new_exe"
done
for exe in prepare/*/um-*; do
name="$(basename "$exe")-$APP_VERSION"
new_exe="$(dirname "$exe")/um"
mv "$exe" "$new_exe"
tar \
--sort=name --format=posix \
--pax-option=exthdr.name=%d/PaxHeaders/%f \
--pax-option=delete=atime,delete=ctime \
--clamp-mtime --mtime='1970-01-01T00:00:00Z' \
--numeric-owner --owner=0 --group=0 \
--mode=0755 \
-cv -C "$(dirname "$exe")" um |
gzip -9 >"dist/${name}.tar.gz"
rm -f "$exe"
done
pushd dist
sha256sum *.zip *.tar.gz >sha256sum.txt
popd