Skip to content
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

dependency resolve with default template and specified output of license #163

Merged
merged 6 commits into from
May 17, 2023
Merged

dependency resolve with default template and specified output of license #163

merged 6 commits into from
May 17, 2023

Conversation

crholm
Copy link
Contributor

@crholm crholm commented May 16, 2023

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 LICENSE file.

license-eye dependency resolve has the --summary flag which takes a path to a go template file, and emits a LICENCE file in the template dir and only if specified.

The --summary flag 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. --summary will 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

  • adds the flag --license, to the command dependency resolve, which takes a path to where the LICENSE content shall be written
  • adds a default template for LICENSE which is used if --license is specified but not --summary
  • adds the inputs.flags to github action dependency/action.yml in order to be able to specify flags to generate a LICENSE file through github actions
  • updating README with information of the new flag and github action

@wu-sheng wu-sheng requested a review from kezhenxu94 May 16, 2023 12:10
@wu-sheng wu-sheng added this to the 0.5.0 milestone May 16, 2023
Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

Looks good to me, @crholm would you fix the linting errors so the CI can pass?

@crholm
Copy link
Contributor Author

crholm commented May 16, 2023

Linting fixed,

An extra linting error had to be fixed, probably new check in linter
https://github.com/apache/skywalking-eyes/pull/163/files#diff-8a27b8884c79bafd31eba6126f1baf57c0beecc820b372f2aa5fd74b16d1ec05R77

Header exclusion also was added to have make all to work properly
https://github.com/apache/skywalking-eyes/pull/163/files#diff-f8a05717594bf148241760c18447442978fdc9db03a4aae93739529e0c124f8aR74

Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

Thank you @crholm

@kezhenxu94 kezhenxu94 merged commit 5dfa68f into apache:main May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants