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

Use project.version instead of tagName for commit messages of version change commits #336

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kristofpeto-tesco
Copy link

@kristofpeto-tesco kristofpeto-tesco commented Jun 10, 2020

Specifying the tagTemplate should not influence the commit message of the commits that change the project version during the release process.

@kristofpeto-tesco kristofpeto-tesco changed the title instead of tagName, it is project.version that should be included in … Use project.version instead of tagName for commit messages of version change commits Jun 10, 2020
@@ -66,4 +68,29 @@ class GitReleasePluginCommitNewVersionTests extends GitSpecification {
remoteGit.repository.workTree.listFiles().any { it.name == 'gradle.properties' && it.text.contains("version=$project.version") }
! remoteGit.repository.workTree.listFiles().any { it.name == 'test.txt' && it.text.contains('testTarget') }
}

def 'should push new version to remote tracking branch with custom commit message as prefix for project version'() {
Copy link
Author

Choose a reason for hiding this comment

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

This test is passing without my change, as tagTemplate's default is '$version'

@TravisBuddy
Copy link

Hey @kristofpeto-tesco,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: bcd5e5e0-ab41-11ea-b056-2f6ef3b381c7

@TravisBuddy
Copy link

Hey @kristofpeto-tesco,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 8b794d90-ab44-11ea-b056-2f6ef3b381c7

revCommit.getShortMessage().equals("New snapshot version: '1.2-SNAPSHOT'.")
}

def 'it is project.version that is present in commit message, and not tagTemplate'() {
Copy link
Author

Choose a reason for hiding this comment

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

This test is failing without my change.

@TravisBuddy
Copy link

Hey @kristofpeto-tesco,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 2af4b790-ab47-11ea-b056-2f6ef3b381c7

@kristofpeto-tesco
Copy link
Author

@WtfJoke can you please take a look at this?

@WtfJoke
Copy link
Contributor

WtfJoke commented Jun 13, 2020

@kristofpeto-tesco Im not a maintainer of this project. 😅

Have a little bit patience, #327 took 4 months in order to get merged ;)

@kristofpeto-tesco
Copy link
Author

@Hillkorn, can you please take a look at this PR, it is quite a small change and is straightforward I believe.

@kristofpeto-tesco
Copy link
Author

@Hillkorn , kind reminder, can you please review this PR? :)

@Hillkorn Hillkorn self-requested a review June 25, 2020 05:49
@Hillkorn Hillkorn self-assigned this Jun 25, 2020
@Hillkorn
Copy link
Collaborator

Hillkorn commented Jun 25, 2020

Hey
Thanks for the PR and sorry that is takes that long :/

I think if we want to change this we should have a configurable template with the behavior as a default here instead of changing it to the project version. I prefer the tagName() because if you have a multi project setup and use the project name in your tag to make it unique you will have it in the commit message too.

@rixy87
Copy link

rixy87 commented Sep 30, 2022

@kristofpeto-tesco Sorry, but @Hillkorn is absolutely right. Default tagName already does what you want to achieve. I think this PR should be closed.

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.

5 participants