dependency resolve with default template and specified output of license#163
Merged
kezhenxu94 merged 6 commits intoapache:mainfrom May 17, 2023
crholm:feat/default-tmpl-n-license
Merged
dependency resolve with default template and specified output of license#163kezhenxu94 merged 6 commits intoapache:mainfrom crholm:feat/default-tmpl-n-license
kezhenxu94 merged 6 commits intoapache:mainfrom
crholm:feat/default-tmpl-n-license
Conversation
kezhenxu94
reviewed
May 16, 2023
Member
kezhenxu94
left a comment
There was a problem hiding this comment.
Looks good to me, @crholm would you fix the linting errors so the CI can pass?
Contributor
Author
|
Linting fixed, An extra linting error had to be fixed, probably new check in linter Header exclusion also was added to have |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cli semantic for flags is somewhat cumbersome, unexpected behavior and does not lend it self well for github actions when we want to automatically generate a
LICENSEfile.license-eye dependency resolvehas the--summaryflag which takes a path to a go template file, and emits a LICENCE file in the template dir and only if specified.The
--summaryflag thus has three functions, providing a template for rendering, specifying path to output and toggling functionality for outputting a LICENSE file or not.My suggestion, to keep backwards compatibility, is to add a new flag,
--license, which specifies where to write the license file and adding a default template.--summarywill retains its behavior for projects depending on it, while allowing a default template and a specific path to be used.The PR does the following
dependency resolve, which takes a path to where the LICENSE content shall be written--licenseis specified but not--summaryinputs.flagsto github actiondependency/action.ymlin order to be able to specify flags to generate a LICENSE file through github actions