From 5b362412be5ac66f14634000ff5220d794e0565e Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Thu, 16 Mar 2023 10:40:17 +0700 Subject: [PATCH] Add quic free version to goreleaser --- .goreleaser-qf.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ scripts/upx.sh | 4 ++++ 2 files changed, 44 insertions(+) create mode 100644 .goreleaser-qf.yaml diff --git a/.goreleaser-qf.yaml b/.goreleaser-qf.yaml new file mode 100644 index 0000000..9e72ed4 --- /dev/null +++ b/.goreleaser-qf.yaml @@ -0,0 +1,40 @@ +before: + hooks: + - go mod tidy +builds: + - id: ctrld + env: + - CGO_ENABLED=0 + flags: + - -trimpath + ldflags: + - -s -w + goos: + - darwin + - linux + - windows + goarch: + - amd64 + - arm64 + tags: + - qf + main: ./cmd/ctrld + hooks: + post: /bin/sh ./scripts/upx.sh {{ .Path }} +archives: + - format_overrides: + - goos: windows + format: zip + strip_parent_binary_folder: true + wrap_in_directory: true + files: + - README.md +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' diff --git a/scripts/upx.sh b/scripts/upx.sh index 5d366eb..852777f 100755 --- a/scripts/upx.sh +++ b/scripts/upx.sh @@ -18,6 +18,10 @@ case "$binary" in echo >&2 "upx does not work with windows arm/arm64 binary yet" exit 0 ;; + *_darwin_*) + echo >&2 "upx claims to work with darwin binary, but testing show that it is broken" + exit 0 + ;; esac upx -- "$binary"