-
Notifications
You must be signed in to change notification settings - Fork 221
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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. :-) |
||
message = "${extension.preCommitText.get()} - ${message}" | ||
} | ||
if (projectAttributes.propertiesFileCreated) { | ||
scmAdapter.add(findPropertiesFile(project)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
} | ||
|
||
def 'accept empty string to ignore requireBranch'() { | ||
|
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.