From 4bd613daef72e470d99767b36d428bdbfa8d0387 Mon Sep 17 00:00:00 2001 From: Francis Chuang <2263040+F21@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:21:37 +1000 Subject: [PATCH] Fix passing release version to ldflags (#91) * Fix passing release version to ldflags * fix(plugin): update docs and remove invalid build arg --------- Co-authored-by: Tom Morelly --- .goreleaser.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 2452e0f..552cbb1 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}}' 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}}' 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" } }