mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-23 11:48:04 +08:00
ci: enhanced build workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
18
hack/hash-files
Executable file
18
hack/hash-files
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
: ${RELEASE_OUT=./release-out}
|
||||
|
||||
# checksums
|
||||
if ! type shasum > /dev/null 2>&1; then
|
||||
echo >&2 "ERROR: shasum is required"
|
||||
exit 1
|
||||
fi
|
||||
find ./${RELEASE_OUT}/ -type f \( -iname "buildx-*" ! -iname "*darwin*" \) -print0 | sort -z | xargs -r0 shasum -a 256 -b | sed 's# .*/# #' > ./${RELEASE_OUT}/checksums.txt
|
||||
|
||||
# verify
|
||||
(
|
||||
cd ./${RELEASE_OUT}
|
||||
shasum -a 256 -U -c checksums.txt
|
||||
)
|
13
hack/release
13
hack/release
@@ -25,15 +25,4 @@ fi
|
||||
mv -f ./${RELEASE_OUT}/**/* ./${RELEASE_OUT}/
|
||||
find ./${RELEASE_OUT} -type d -empty -delete
|
||||
|
||||
# checksums
|
||||
if ! type shasum > /dev/null 2>&1; then
|
||||
echo >&2 "ERROR: shasum is required"
|
||||
exit 1
|
||||
fi
|
||||
find ./${RELEASE_OUT}/ -type f \( -iname "buildx-*" ! -iname "*darwin*" \) -print0 | sort -z | xargs -r0 shasum -a 256 -b | sed 's# .*/# #' > ./${RELEASE_OUT}/checksums.txt
|
||||
|
||||
# verify
|
||||
(
|
||||
cd ./${RELEASE_OUT}
|
||||
shasum -a 256 -U -c checksums.txt
|
||||
)
|
||||
source ./hack/hash-files
|
||||
|
Reference in New Issue
Block a user