chore: fixed goreleaser options

This commit is contained in:
jamesread 2026-06-29 00:54:54 +01:00
parent c5cd5295b0
commit 353f30f46b
2 changed files with 11 additions and 4 deletions

View File

@ -6,7 +6,8 @@ before:
- make windows-resources VERSION={{ .Version }}
builds:
- env:
- skip: '{{ isEnvSet "GORELEASER_SKIP_BUILD" }}'
env:
- CGO_ENABLED=0
binary: OliveTin
main: main.go

View File

@ -2,6 +2,8 @@
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
GORELEASER_CONFIG="${REPO_ROOT}/.goreleaser.yml"
TIMEOUT="${GORELEASER_TIMEOUT:-60m}"
if [[ -z "${VERSION:-}" ]]; then
@ -9,9 +11,13 @@ if [[ -z "${VERSION:-}" ]]; then
exit 1
fi
goreleaser release --clean --timeout "${TIMEOUT}" --skip=checksum,publish "$@"
build_config="$(mktemp)"
trap 'rm -f "${build_config}"' EXIT
awk '/^checksum:/{print; print " disable: true"; next}1' "${GORELEASER_CONFIG}" > "${build_config}"
goreleaser release -f "${build_config}" --clean --timeout "${TIMEOUT}" --skip=publish "$@"
"${SCRIPT_DIR}/build-msi.sh"
goreleaser release --timeout "${TIMEOUT}" \
--skip=validate,before,build,archive,nfpm,docker,sign,sbom,after,announce "$@"
GORELEASER_SKIP_BUILD=1 goreleaser release --timeout "${TIMEOUT}" \
--skip=validate,before,archive,nfpm,docker,sign,sbom,announce "$@"