Skip to content

RTDEV-62881 - Modify Go pack zip LICENSE for submodules#829

Merged
bhanurp merged 1 commit intojfrog:masterfrom
dorsJfrog:bugfix/RTDEV-62881-fixGoLicense
Sep 10, 2025
Merged

RTDEV-62881 - Modify Go pack zip LICENSE for submodules#829
bhanurp merged 1 commit intojfrog:masterfrom
dorsJfrog:bugfix/RTDEV-62881-fixGoLicense

Conversation

@dorsJfrog
Copy link
Copy Markdown
Contributor

@dorsJfrog dorsJfrog commented Sep 9, 2025

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.

Comment on lines +410 to +422
if (!entryName.endsWith(LICENSE)) {
return;
}

if (shouldPackSubModule() && entryName.endsWith(subModuleName + "/" + LICENSE)) {
// use the packing submodule LICENSE
licensePath = entryName;
return;
}
if (entryName.substring(entryName.indexOf('/') + 1).equals(LICENSE)) {
// use the root LICENSE
licensePath = entryName;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need a default case to make sure root license is used

  • submodule with LICENSE -> use submodule LICENSE
  • submodule without LICENSE -> use root LICENSE
    any other scenario use root license?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the default is set to empty string, if it leave that's way, so there is no LICENSE to use.
in case using the root module is handled by the second condition.
in case the entryName is a LICENSE from a submodule that we are not asking for, its won't use it as well

@dorsJfrog dorsJfrog force-pushed the bugfix/RTDEV-62881-fixGoLicense branch from 5acf815 to c6c33f7 Compare September 10, 2025 07:08
@bhanurp bhanurp self-requested a review September 10, 2025 07:24
@bhanurp bhanurp added the safe to test Approve running integration tests on a pull request label Sep 10, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 10, 2025
@bhanurp bhanurp merged commit 6a8b28a into jfrog:master Sep 10, 2025
19 of 32 checks passed
nitinp19 pushed a commit to nitinp19/build-info that referenced this pull request Sep 23, 2025
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.

2 participants