-
Notifications
You must be signed in to change notification settings - Fork 7
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
set default values for maintainer and vendor to hashicorp #14
Changes from 1 commit
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ type NfpmInput struct { | |
Arch string | ||
Version string | ||
Maintainer string | ||
Vendor string | ||
Description string | ||
Homepage string | ||
License string | ||
|
@@ -76,6 +77,7 @@ func main() { | |
inputArch := os.Getenv("INPUT_ARCH") | ||
inputVersion := os.Getenv("INPUT_VERSION") | ||
inputMaintainer := os.Getenv("INPUT_MAINTAINER") | ||
inputVendor := os.Getenv("INPUT_VENDOR") | ||
inputDescription := os.Getenv("INPUT_DESCRIPTION") | ||
inputHomepage := os.Getenv("INPUT_HOMEPAGE") | ||
inputLicense := os.Getenv("INPUT_LICENSE") | ||
|
@@ -110,6 +112,7 @@ func main() { | |
Arch: inputArch, | ||
Version: inputVersion, | ||
Maintainer: inputMaintainer, | ||
Vendor: inputVendor, | ||
Description: inputDescription, | ||
Homepage: inputHomepage, | ||
License: inputLicense, | ||
|
@@ -136,7 +139,8 @@ arch: {{ .Arch }} | |
platform: linux | ||
release: 1 | ||
version: {{ .Version }} | ||
maintainer: {{ .Maintainer }} | ||
maintainer: "HashiCorp" | ||
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. I think instead of hardcoding these here - we would want to add something to the above section for
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. My personal opinion on this is we should set it as close to user input as possible so it is surfaced easier. So for example, rather than having the empty check in go code here, set the default in the input file https://github.com/hashicorp/actions-packaging-linux/pull/14/files#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R33. This action should primarily be for us at HashiCorp to use internally but it seems more intuitive that users would check the input file because that's their interface with the action, rather than dig into the template file to check what the implementation details are and find out we are overwriting empty strings. 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. So the default is defined in GHA instead of the tool itself. I like that. It also addresses the issue of opting out of the tag if one were to re-use the tool elsewhere. |
||
vendor: "HashiCorp" | ||
description: {{ .Description }} | ||
homepage: {{ .Homepage }} | ||
license: {{ .License }} | ||
|
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.
It would be good to add this to the
inputs
table in the readme too!