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

[question] Change only part of the version in a file #243

Open
1oglop1 opened this issue Mar 7, 2022 · 0 comments
Open

[question] Change only part of the version in a file #243

1oglop1 opened this issue Mar 7, 2022 · 0 comments

Comments

@1oglop1
Copy link

1oglop1 commented Mar 7, 2022

Hi,
I have a library that depends on pulumi but I'd like to version that library separately from the dependency.
On top of that I use gitlab CI where I need to update pulumi version so I though that bumpversion can help me with this.
Let's call my library components

my setup looks like this:
pyproject.toml

version = "1.0.1+pulumi.3.24.1"

.gitlab-ci.yml

variables:
  PYTHON_IMAGE: python:3.8-slim
  PULUMI_VERSION: 3.24.1

IIUC I may be able to use independent = True but I've been playing with the bump2version for 30 minutes so I'm pretty new to this.
I'd like to be able to increment the 1.0.1 part normally and every now and then change the pulumi version.
Can bumpversion help me with this?

I took an example and made a regex (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([-](?P<release>(dev|rc))+(?P<build>\d+))?\+pulumi\.(?P<pulumi>\d+\.\d+\.\d+).

Here is what I'd like to achieve:

  1. bumpversion minor -> 1.0.1+pulumi.3.24.1 -> 1.1.0+pulumi.3.24.1 - this would update pyproject.toml
  2. bumpversion pulumi 3.25.0 -> 1.1.0+pulumi.3.25.0 - this would update both pyproject.toml + .gitlab-ci.yml

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant