mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-05-23 00:26:19 +08:00
ci: strip archives, reduce verbosity
This commit is contained in:
parent
896ace49fd
commit
791f9c0621
@ -90,7 +90,10 @@ jobs:
|
|||||||
path: prepare
|
path: prepare
|
||||||
pattern: um-*
|
pattern: um-*
|
||||||
- name: repack archive
|
- name: repack archive
|
||||||
run: ./misc/repack.sh "${{ steps.vars.outputs.git_tag }}"
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y strip-nondeterminism
|
||||||
|
./misc/repack.sh "${{ steps.vars.outputs.git_tag }}"
|
||||||
- name: Publish all-in-one archive
|
- name: Publish all-in-one archive
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
# see .gitea/workflows/build.yml
|
# see .gitea/workflows/build.yml
|
||||||
|
|
||||||
APP_VERSION="${1:-$(git describe --tags --always)}"
|
APP_VERSION="${1:-$(git describe --tags --always)}"
|
||||||
@ -8,7 +8,8 @@ for exe in prepare/*/um-*.exe; do
|
|||||||
new_exe="$(dirname "$exe")/um.exe"
|
new_exe="$(dirname "$exe")/um.exe"
|
||||||
mv "$exe" "$new_exe"
|
mv "$exe" "$new_exe"
|
||||||
|
|
||||||
zip -9 -j "dist/${name}.zip" "$new_exe"
|
echo "archiving ${new_exe}..."
|
||||||
|
zip -Xqj9 "dist/${name}.zip" "$new_exe"
|
||||||
rm -f "$new_exe"
|
rm -f "$new_exe"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ for exe in prepare/*/um-*; do
|
|||||||
new_exe="$(dirname "$exe")/um"
|
new_exe="$(dirname "$exe")/um"
|
||||||
mv "$exe" "$new_exe"
|
mv "$exe" "$new_exe"
|
||||||
|
|
||||||
|
echo "archiving ${new_exe}..."
|
||||||
tar \
|
tar \
|
||||||
--sort=name --format=posix \
|
--sort=name --format=posix \
|
||||||
--pax-option=exthdr.name=%d/PaxHeaders/%f \
|
--pax-option=exthdr.name=%d/PaxHeaders/%f \
|
||||||
@ -24,11 +26,18 @@ for exe in prepare/*/um-*; do
|
|||||||
--clamp-mtime --mtime='1970-01-01T00:00:00Z' \
|
--clamp-mtime --mtime='1970-01-01T00:00:00Z' \
|
||||||
--numeric-owner --owner=0 --group=0 \
|
--numeric-owner --owner=0 --group=0 \
|
||||||
--mode=0755 \
|
--mode=0755 \
|
||||||
-cv -C "$(dirname "$exe")" um |
|
-c -C "$(dirname "$exe")" um |
|
||||||
gzip -9 >"dist/${name}.tar.gz"
|
gzip -9 >"dist/${name}.tar.gz"
|
||||||
rm -f "$exe"
|
rm -f "$exe"
|
||||||
done
|
done
|
||||||
|
|
||||||
pushd dist
|
pushd dist
|
||||||
|
|
||||||
|
if command -v strip-nondeterminism >/dev/null 2>&1; then
|
||||||
|
echo 'strip archives...'
|
||||||
|
strip-nondeterminism *.zip *.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'Creating checksum...'
|
||||||
sha256sum *.zip *.tar.gz >sha256sum.txt
|
sha256sum *.zip *.tar.gz >sha256sum.txt
|
||||||
popd
|
popd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user