Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: --version when a version is provided with -ldflags #1711

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

vmaerten
Copy link
Member

@vmaerten vmaerten commented Jul 5, 2024

We went a bit too far when refactoring this. Some people build Task theirself and provide the version with ldflags. But in our implementation we override the version.
fixes #1709
I used this command to check :
go build -o "task" -ldflags "-s -w -X github.com/go-task/task/v3/internal/version.version=3.38.0" ./cmd/task like they do in Homebrew (https://github.com/Homebrew/homebrew-core/blob/e71417b07f53e9ea7c79974dd6f6c2297d9a9a1c/Formula/g/go-task.rb#L23-L32)

@andreynering andreynering added the area: releasing Changes related to the release process. label Jul 5, 2024
@andreynering andreynering merged commit 9ee4f21 into go-task:main Jul 5, 2024
13 checks passed
@vmaerten vmaerten deleted the fix/version-check-devrel branch July 7, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: releasing Changes related to the release process.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version set via ldflags is ignored when building from source tarball
2 participants