-
Notifications
You must be signed in to change notification settings - Fork 220
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
#361 fixed preCommitText issue with whitespace and fixed failing unit… #381
base: main
Are you sure you want to change the base?
Conversation
…failing unitTest for GitReleasePluginTests
@@ -130,7 +130,8 @@ class GitReleasePluginTests extends Specification { | |||
executor.exec(['git', 'checkout', 'myBranch'], failOnStderr: false, directory: remoteRepo, env: [:]) | |||
executor.exec(['git', 'reset', '--hard', 'HEAD'], failOnStderr: false, directory: remoteRepo, env: [:]) | |||
then: | |||
newestCommit.contains("Signed-off-by: Unit Test <unit@test>") | |||
// newestCommit.contains("Signed-off-by: Unit Test <unit@test>") | |||
newestCommit.contains("[Gradle Release Plugin] - new version commit: '1.1'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This renders the test useless. The point is, that it tests whether the -s
is given to Git and thus the Signed-off-by
line added.
Here this also works just fine.
preCommitText = '[Gradle Release Plugin]' | ||
preTagCommitMessage = 'pre tag commit: ' | ||
tagCommitMessage = 'creating tag: ' | ||
newVersionCommitMessage = 'new version commit: ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good idea.
This changes the result for everyone setting the preCommitText
already which is a text that should be prepended additionally to the other configured messages.
@@ -22,8 +22,8 @@ class PreTagCommit extends BaseReleaseTask { | |||
if (projectAttributes.usesSnapshot || projectAttributes.versionModified || projectAttributes.propertiesFileCreated) { | |||
// should only be committed if the project was using a snapshot version. | |||
String message = extension.preTagCommitMessage.get() + " '${tagName()}'." | |||
if (extension.preCommitText) { | |||
message = "${extension.preCommitText.get()} ${message}" | |||
if (extension.preCommitText.get()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only line in the PR that I would second, as it also is the same I did in #384 not seeing this PR. :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which was merged just now, so my recommendation would be to close this PR unmerged. :-)
…Test for GitReleasePluginTests