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

Expose parts (major/minor/patch/...) in 'replace' too #35

Closed
florisla opened this issue Aug 30, 2018 · 2 comments · Fixed by #41
Closed

Expose parts (major/minor/patch/...) in 'replace' too #35

florisla opened this issue Aug 30, 2018 · 2 comments · Fixed by #41

Comments

@florisla
Copy link
Collaborator

florisla commented Aug 30, 2018

Hi,

I've been surprised a couple of times that I can use {major}, {minor} and {patch} placeholders in serialize, but not in replace. In replace, only new_version is available, which is already formatted by the serialize format.

Is this a design choice or would you be open to change that?

I would definitely like to have to flexibility to choose between new_version and major/minor/patch.

@florisla
Copy link
Collaborator Author

florisla commented Aug 30, 2018

To clarify, the mentioned flexibility would be handy to handle this theoretical (but not far-fetched) target file. It would also require the 'multi replace' feature discussed in #4.

MODULE_VERSION = "1.3.2"
BUILD_VERSION = (1,3,2)
PACKAGE_VERSION = '1_3_2'

@florisla
Copy link
Collaborator Author

florisla commented Sep 6, 2018

I'm going to create a pull request for this feature.

It's useful if you want more control over the version string in tag_name and tag_message as well.

For example, my format is {major}.{minor}.{patch}-{release} but the 'release' part has an optional value gamma. So {major}.{minor}.{patch} is also a valid serialization format.

current_version now (sometimes) includes the -gamma suffix but I want that suffix to not appear in my tag name and message. So if tag_name and tag_message can use {major}, {minor} and {patch} then I can customize them to my liking.

@florisla florisla changed the title Is exposing major/minor/patch in 'replace' desirable? Expose parts (major/minor/patch/...) in 'replace' too Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants