Skip to content

Updating version_variables that follow tag_format #846

@fk128

Description

@fk128

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 stalefeatureA 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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy