2015-09-28 23:39:44 +00:00
|
|
|
#!/bin/bash
|
2024-08-20 03:09:12 +00:00
|
|
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
# You may need to go install github.com/goreleaser/goreleaser/v2@latest first
|
|
|
|
GORELEASER="goreleaser build --clean"
|
|
|
|
if [ -z "$CI" ]; then
|
|
|
|
GORELEASER+=" --snapshot"
|
|
|
|
fi
|
|
|
|
|
2024-11-16 04:43:21 +00:00
|
|
|
mkdir -p build
|
|
|
|
|
2024-08-20 03:09:12 +00:00
|
|
|
$GORELEASER
|
2015-09-28 23:39:44 +00:00
|
|
|
|
2024-11-16 04:43:21 +00:00
|
|
|
cp yq.1 build/yq.1
|
|
|
|
|
2020-03-01 21:43:47 +00:00
|
|
|
cd build
|
2021-06-18 13:43:30 +00:00
|
|
|
|
2024-08-20 03:09:12 +00:00
|
|
|
# Remove artifacts from goreleaser
|
|
|
|
rm artifacts.json config.yaml metadata.json
|
|
|
|
|
2021-10-17 07:25:36 +00:00
|
|
|
find . -executable -type f | xargs -I {} tar czvf {}.tar.gz {} yq.1 -C ../scripts install-man-page.sh
|
|
|
|
tar czvf yq_man_page_only.tar.gz yq.1 -C ../scripts install-man-page.sh
|
2021-06-18 13:43:30 +00:00
|
|
|
|
2020-12-21 23:25:15 +00:00
|
|
|
rm yq_windows_386.exe.tar.gz
|
|
|
|
rm yq_windows_amd64.exe.tar.gz
|
2020-12-21 10:40:08 +00:00
|
|
|
|
|
|
|
zip yq_windows_386.zip yq_windows_386.exe
|
2021-06-11 22:18:56 +00:00
|
|
|
zip yq_windows_amd64.zip yq_windows_amd64.exe
|
2022-01-22 23:45:18 +00:00
|
|
|
|
|
|
|
rm yq.1
|
|
|
|
|
|
|
|
rhash -r -a . -o checksums
|
|
|
|
|
2023-08-11 03:51:04 +00:00
|
|
|
rhash -r -a --bsd . -o checksums-bsd
|
|
|
|
|
2022-01-22 23:45:18 +00:00
|
|
|
rhash --list-hashes > checksums_hashes_order
|
|
|
|
|
2022-11-14 05:38:43 +00:00
|
|
|
cp ../scripts/extract-checksum.sh .
|