Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Updating version_variables that follow tag_format #846

Copy link
Copy link
Closed
@fk128

Description

@fk128
Issue body actions

Hi,

Is it possible to update mentions of the version in files set in version_variables that follow tag_format?

I'm using kustomize for deployments on kubernetes, and I want to be able to update the docker image tag on release. The issue is that, in the yaml file, the tag uses the v prefix, as defined in tag_format.

For instance, the following does not work to update the yaml file because semantic release is not looking for the tag_format pattern

[tool.semantic_release]
tag_format = "v{version}"
version_variables = ["api/app/__init__.py:__version__",
    "manifests/overlays/prod/kustomization.yaml:newTag"]
# kustomization.yaml
images:
  - name: repo/image
    newTag: "v0.1.0"

It only seems to work to get semantic release to update the yaml file if I remove the v prefix, like so

# kustomization.yaml
images:
  - name: repo/image
    newTag: "0.1.0"

but then that wouldn't work, since the actual docker image tag has v as per tag_format.

Is this something that could be solved, perhaps by getting the version replacement to also look for tag_format?

Thanks.

Metadata

Metadata

Assignees

Labels

confirmedPrevent from becoming stalePrevent from becoming stalefeatureA new feature or a feature requestA new feature or a feature requestquestion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.