Skip to content

Commit

Permalink
set vendor in input file
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-labry committed Feb 2, 2023
1 parent d83bf6f commit a4f550d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This is a GitHub Action wrapper around nFPM, used to produce DEBs and RPMs.
| `arch` | Build architecture. | |
| `version` | Product semver version. | |
| `maintainer` | Maintainer name. | |
| `vendor` | Default vendor | HashiCorp |
| `description` | Product description. | |
| `homepage` | Product homepage. | |
| `license` | Product usage license. | |
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inputs:
required: false
vendor:
description: 'Vendor name'
default: ''
default: 'HashiCorp'
required: false
description:
description: 'Product description.'
Expand Down
11 changes: 2 additions & 9 deletions fpm_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func main() {
inputName := os.Getenv("INPUT_NAME")
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")
Expand All @@ -95,15 +97,6 @@ func main() {
binName := filepath.Base(inputBinary)
binDest := filepath.Join(inputBinPath, binName)

inputVendor := os.Getenv("INPUT_VENDOR")
if inputVendor == "" {
inputVendor = "HashiCorp"
}

inputMaintainer := os.Getenv("INPUT_MAINTAINER")
if inputVendor == "" {
inputVendor = "HashiCorp"
}
// This maps to "armv7hl" for rpm and "armhf" for deb
// "arm" is not a valid arch for either type, and it
// does not get mapped automatically in nfpm
Expand Down

0 comments on commit a4f550d

Please sign in to comment.