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
[Bug]: .VERSION
is wrong in --snapshot
mode.
#2415
Comments
you can tweak that by changing probably you have the v prefix there. |
Indeed, our |
I just checked: It is the default behaviour (i.e. Maybe that could/should be adjusted to |
See goreleaser/goreleaser#2415 for reference
yeah, I think it makes sense, can you open a pr? |
Sure, see #2417. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
The template variable
{{ .Version }}
behaves differently when Goreleaser is invoked regularly vs. when it is invoked with--snapshot
:v
from the tag, i.e. if the tag isv1.2.3
, then.Version
becomes1.2.3
.v1.2.3
, then.Version
becomesv1.2.3-snapshot
.We use
.Version
indocker.image_templates
as follows:When we do a regular release, the image that is built becomes
docker.io/foo/bar:v1.2.3
. But when we build a snapshot, then the image that is built becomesdocker.io/foo/bar:vv1.2.3-snapshot
, which is unexpected.How can we reproduce this?
Prepare
git clone https://github.com/cimnine/goreleaser-bug.git reproduce cd reproduce
Correct Version
Incorrect Version
goreleaser version
GoReleaser Check
Search
Code of Conduct
Additional context
No response
The text was updated successfully, but these errors were encountered: