mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
Add freebsd to goreleaser config
While at it, fixed the hook upx script to run per file, and ignore binaries which are not supported.
This commit is contained in:
committed by
Cuong Manh Le
parent
14bc29751f
commit
0dfa377e08
+6
-1
@@ -11,6 +11,7 @@ builds:
|
|||||||
- -s -w
|
- -s -w
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
|
- freebsd
|
||||||
- windows
|
- windows
|
||||||
goarch:
|
goarch:
|
||||||
- 386
|
- 386
|
||||||
@@ -26,7 +27,11 @@ builds:
|
|||||||
- softfloat
|
- softfloat
|
||||||
main: ./cmd/ctrld
|
main: ./cmd/ctrld
|
||||||
hooks:
|
hooks:
|
||||||
post: /bin/sh ./scripts/upx.sh
|
post: /bin/sh ./scripts/upx.sh {{ .Path }}
|
||||||
|
ignore:
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: arm
|
||||||
|
goarm: 5
|
||||||
archives:
|
archives:
|
||||||
- format_overrides:
|
- format_overrides:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
|
|||||||
+19
-3
@@ -2,6 +2,22 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
for dist_dir in ./dist/ctrld*; do
|
binary=$1
|
||||||
upx --brute "${dist_dir}/ctrld"
|
|
||||||
done
|
if [ -z "$binary" ]; then
|
||||||
|
echo >&2 "Usage: $0 <binary>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$binary" in
|
||||||
|
*_freebsd_*)
|
||||||
|
echo >&2 "upx does not work with freebsd binary yet"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*_windows_arm*)
|
||||||
|
echo >&2 "upx does not work with windows arm/arm64 binary yet"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
upx -- "$binary"
|
||||||
|
|||||||
Reference in New Issue
Block a user