Conversation
|
This was tested as part of evolvedbinary/elemental#233 , I can confirm the whole workflow is working, but I didn't dig deep into the workings of the plugin. |
5a6e150 to
07ea7e6
Compare
adamretter
left a comment
There was a problem hiding this comment.
Some small changes and questions please
| @@ -0,0 +1,50 @@ | |||
| <!-- | |||
|
|
|||
| Copyright [2024] [Lukas Mansour] | |||
There was a problem hiding this comment.
As this is a new file created by us. It should not have:
Copyright [2024] [Lukas Mansour]
Modifications: Copyright (C) 2026, Evolved Binary Ltd
It should only have:
Copyright (C) 2026, Evolved Binary Ltd
You'll need to make some config changes to the license-maven-plugin to support that.
| import static org.junit.jupiter.api.Assertions.fail | ||
|
|
||
|
|
||
| /* |
There was a problem hiding this comment.
Same for this license declaration
| } | ||
|
|
||
| final String content = new String(Files.readAllBytes(patchedFile)) | ||
| assertTrue(content.contains("Hello, Elemental!"), "Expected content was not found in: " + patchedFile) |
There was a problem hiding this comment.
Would content.equals be more accurate here?
There was a problem hiding this comment.
It's an empty placeholder, without it, src/main/resources would be empty, which means Git won't track the folder, which then makes the patch step fail because its target directory doesn't exist yet.
| <!-- | ||
|
|
||
| Copyright [2024] [Lukas Mansour] | ||
| Modifications: Copyright (C) 2026, Evolved Binary Ltd |
There was a problem hiding this comment.
Same issue with the license declaration as above.
|
|
||
|
|
||
| /* | ||
| * Copyright [2024] [Lukas Mansour] |
There was a problem hiding this comment.
Same issue with the license declaration as above.
| } | ||
|
|
||
| final String content = new String(Files.readAllBytes(createdFile)) | ||
| assertTrue(content.contains("brand new file"), "Expected content was not found in: " + createdFile) |
There was a problem hiding this comment.
Would content.equals be more accurate here?
07ea7e6 to
6f40643
Compare
Switched java-diff-utils for JGit's ApplyCommand, the old library couldn't create new files from a patch, only edit existing ones. Tested and both cases work now.