From 5dce3ecc6031c1af99916641e46bee5f681d3688 Mon Sep 17 00:00:00 2001 From: Francis Chuang Date: Wed, 5 Jun 2024 14:43:16 +1000 Subject: [PATCH 1/2] Fix passing release version to ldflags --- .goreleaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 2452e0f..e6652a8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -13,7 +13,7 @@ builds: flags: - -trimpath ldflags: - - '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= ' + - '-s -w -X main.Version={{.Version}} -X main.VersionPrerelease= ' targets: - linux_amd64 - @@ -22,7 +22,7 @@ builds: flags: - -trimpath ldflags: - - '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= ' + - '-s -w -X main.Version={{.Version}} -X main.VersionPrerelease= ' binary: "{{ .ProjectName }}_v{{ .Version }}_{{ .Env.PACKER_PROTOCOL_VERSION }}_{{ .Os }}_{{ .Arch }}" goos: - freebsd From 29b400c6ee87402a8b81765aacb8a806bc028ff8 Mon Sep 17 00:00:00 2001 From: Tom Morelly Date: Wed, 5 Jun 2024 18:14:50 +0700 Subject: [PATCH 2/2] fix(plugin): update docs and remove invalid build arg --- .goreleaser.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index e6652a8..552cbb1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -13,7 +13,7 @@ builds: flags: - -trimpath ldflags: - - '-s -w -X main.Version={{.Version}} -X main.VersionPrerelease= ' + - '-s -w -X main.Version={{.Version}}' targets: - linux_amd64 - @@ -22,7 +22,7 @@ builds: flags: - -trimpath ldflags: - - '-s -w -X main.Version={{.Version}} -X main.VersionPrerelease= ' + - '-s -w -X main.Version={{.Version}}' binary: "{{ .ProjectName }}_v{{ .Version }}_{{ .Env.PACKER_PROTOCOL_VERSION }}_{{ .Os }}_{{ .Arch }}" goos: - freebsd diff --git a/README.md b/README.md index c7d7685..2cfe159 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ packer { required_plugins { goss = { - version = "3.2.0" + version = "~> 3" source = "github.com/YaleUniversity/goss" } }