Skip to content

Conversation

@alebcay
Copy link
Contributor

@alebcay alebcay commented Dec 21, 2023

goreleaser currently strips the leading v off of the SemVer tag when passing to ldflags, while the container build does not remove it.

Remove the leading v, if present, off of the version in container builds so that the version returned by golangci-lint --version is consistent regardless of whether the program is running standalone or in a container.

As discussed in #4268.

Fixes #4263

@boring-cyborg
Copy link

boring-cyborg bot commented Dec 21, 2023

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Dec 21, 2023

CLA assistant check
All committers have signed the CLA.

@ldez ldez self-requested a review December 21, 2023 15:39
@ldez ldez added the docker PR that update Docker code label Dec 21, 2023
@ldez ldez changed the title build(docker): make binary versioning inside container consistent with goreleaser build build(docker): make versioning inside container consistent with binaries Dec 21, 2023
@ldez ldez added the waiting for: contributor feedback Requires additional feedback label Dec 21, 2023
…h goreleaser build

goreleaser currently strips the leading `v` off of the SemVer tag when passing to ldflags,
while the container build does not remove it.

Remove the leading `v`, if present, off of the version in container builds so that the
version returned by `golangci-lint --version` is consistent regardless of whether the
program is running standalone or in a container.
@alebcay alebcay force-pushed the docker-binary-versioning branch from ae8af67 to 7f2ab2e Compare December 21, 2023 22:27
@ldez ldez changed the title build(docker): make versioning inside container consistent with binaries fix: make versioning inside container consistent with binaries Dec 21, 2023
@ldez ldez added bug Something isn't working and removed waiting for: contributor feedback Requires additional feedback labels Dec 21, 2023
@ldez ldez changed the title fix: make versioning inside container consistent with binaries fix: make versioning inside Docker image consistent with binaries Dec 22, 2023
@ldez ldez merged commit 95bc7a8 into golangci:master Dec 22, 2023
@ldez ldez modified the milestone: v1.56 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working docker PR that update Docker code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version format in macOS is different than other platforms

3 participants