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

Custom prefix, optional versioning based on multiple commit messages #102

Conversation

L-Sypniewski
Copy link

@L-Sypniewski L-Sypniewski commented Feb 5, 2021

Added a possibility to use a custom prefix

Added a possibility to define an optional PREFIX parameter to be added before x.y.z version number.
Removed WITH_V parameter - omitting PREFIX results in the same behaviour as setting WITH_V to false in a previous versions.

Multiple commit messages are taken into account when bumping a version number

New version number is based on all commit messages between a defined commit (HEAD by default) and a last tag with a given prefix.
This behavior is disabled by default, it can be toggled on with USE_LAST_COMMIT_ONLY parameter set to false.

Added support for pull requests
Specifying latest branch commit is useful when using this action for pull requests - one can set environment variable as follows: BRANCH_LATEST_COMMIT: ${{ github.event.pull_request.head.sha }} to calculate a new version basing on commits from a given PR.

The x.y.z precedence is preserved, so if there are three commits with #minor tags and two with #major then only two #major tags are taken into consideration - the new version is (x+2).0.0 in that case.

Resolves #72
Resolves #226
Closes #95

@L-Sypniewski L-Sypniewski changed the title Prefix parameter versioning based on multiple messages Custom prefix, parameter versioning based on multiple messages Feb 5, 2021
entrypoint.sh Outdated Show resolved Hide resolved
action.yml Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
@L-Sypniewski L-Sypniewski force-pushed the prefix-parameter-versioning-based-on-multiple-messages branch from e54246e to d2b4258 Compare July 30, 2021 15:47
@L-Sypniewski L-Sypniewski force-pushed the prefix-parameter-versioning-based-on-multiple-messages branch from 8baed42 to 62401c9 Compare August 3, 2021 21:58
@L-Sypniewski L-Sypniewski force-pushed the prefix-parameter-versioning-based-on-multiple-messages branch from bf120f5 to d0bf515 Compare August 3, 2021 22:04
@L-Sypniewski L-Sypniewski force-pushed the prefix-parameter-versioning-based-on-multiple-messages branch from a255227 to 37e66bd Compare August 3, 2021 22:10
@L-Sypniewski L-Sypniewski force-pushed the prefix-parameter-versioning-based-on-multiple-messages branch from c837d81 to 23b0f66 Compare August 3, 2021 22:13
@raphaelreyna
Copy link

Are there any plans on moving forward with this?
Adding custom prefixes would allow for this action to be used with Go submodules which would be pretty sweet 👍

README.md Outdated Show resolved Hide resolved
@msummers-nr
Copy link

Will the custom prefix PR be accepted? Or some flavor of it?

I have a very pressing need to use a tag prefix other than v

Thanks

Copy link
Collaborator

@sbe-arg sbe-arg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't disagree with this but id probably warn some breaking changes in the readme for existing users not having the with_v var set and using default.

entrypoint.sh Outdated Show resolved Hide resolved
@L-Sypniewski
Copy link
Author

L-Sypniewski commented Jan 11, 2023

@sbe-arg I have added the tests and resolved the conflicts, the PR is ready to be reviewed.
I'd appreciate suggestions especially regarding organizing the test related code - it think those tests are valuable, but they are hard to read.

@danrs #226 issue has been addressed and there's a testcase for it in this PR

@L-Sypniewski L-Sypniewski force-pushed the prefix-parameter-versioning-based-on-multiple-messages branch from 17dd96b to 7313ae6 Compare January 11, 2023 11:18
@L-Sypniewski L-Sypniewski mentioned this pull request Jan 11, 2023
@sbe-arg
Copy link
Collaborator

sbe-arg commented Jan 14, 2023

Thanks for sorting the conflicts.

We broke the flow for so many people in the last few prs specially related to history of commits. Adding the new last commit flags conflicts with the changes merged in the 1.61 1.60 and 1.59. Can you please remove the commits history and adjust it with the existing changes?

I do support the prefix idea I think is needed but I think it requires testing and is probably a great excuse for v2.

And thanks a million for the test scripts.

Cc @sammcj when you have time to have a look as well.

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jan 14, 2023

We introduced the BRANCH_HISTORY setting in the last month

@sammcj
Copy link
Collaborator

sammcj commented Apr 1, 2023

What's happening with this one folks?

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jun 17, 2023

I'm tempted to close this one and the author can reopen as necesary.

@sbe-arg sbe-arg closed this Jun 17, 2023
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

Successfully merging this pull request may close these issues.

Double v bug when combining WITH_V and INITIAL_VERSION Add Prefix to Tags