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: make versioning inside Docker image consistent with binaries #4279

Merged
merged 2 commits into from
Dec 22, 2023

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

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
build/Dockerfile Outdated Show resolved Hide resolved
@ldez ldez added the feedback required 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 feedback required 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
12 checks passed
Antonboom pushed a commit to Antonboom/golangci-lint that referenced this pull request Mar 3, 2024
@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