Skip to content

Commit

Permalink
Update goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
hamstah committed Jan 26, 2021
1 parent 6d582cd commit 9bf2c61
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 55 deletions.
94 changes: 57 additions & 37 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
before:
hooks:
- go mod download
archive:
format: binary
archives:
- id: main
format: binary
checksum:
name_template: 'SHA256SUMS'
changelog:
Expand All @@ -11,23 +9,26 @@ changelog:
exclude:
- '^docs:'
- '^test:'
sign:
signature: "${artifact}.asc"
artifacts: all
args: ["--armor", "--output", "$signature", "--detach-sig", "$artifact"]
nfpm:
vendor: hamstah
homepage: https://github.com/hamstah/awstools
maintainer: Nico Esteves <[email protected]>
license: MIT
formats:
- deb
- rpm
signs:
-
signature: "${artifact}.asc"
artifacts: all
args: ["--armor", "--output", "$signature", "--detach-sig", "$artifact"]
nfpms:
-
vendor: hamstah
homepage: https://github.com/hamstah/awstools
maintainer: Nico Esteves <[email protected]>
license: MIT
formats:
- deb
- rpm
release:
draft: true
builds:

- env:
- id: aws-dump
env:
- CGO_ENABLED=0
main: ./aws/dump/
binary: aws-dump
Expand All @@ -38,7 +39,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: elb-resolve-alb-external-url
env:
- CGO_ENABLED=0
main: ./elb/resolve-alb-external-url/
binary: elb-resolve-alb-external-url
Expand All @@ -49,7 +51,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: elb-resolve-elb-external-url
env:
- CGO_ENABLED=0
main: ./elb/resolve-elb-external-url/
binary: elb-resolve-elb-external-url
Expand All @@ -60,7 +63,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ec2-ip-from-name
env:
- CGO_ENABLED=0
main: ./ec2/ip-from-name/
binary: ec2-ip-from-name
Expand All @@ -71,7 +75,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ec2-describe-instances
env:
- CGO_ENABLED=0
main: ./ec2/describe-instances/
binary: ec2-describe-instances
Expand All @@ -82,7 +87,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: kms-env
env:
- CGO_ENABLED=0
main: ./kms/env/
binary: kms-env
Expand All @@ -93,7 +99,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: cloudwatch-put-metric-data
env:
- CGO_ENABLED=0
main: ./cloudwatch/put-metric-data/
binary: cloudwatch-put-metric-data
Expand All @@ -104,7 +111,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: iam-request-ssh-key-signature
env:
- CGO_ENABLED=0
main: ./iam/request-ssh-key-signature/
binary: iam-request-ssh-key-signature
Expand All @@ -115,7 +123,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: iam-sync-users
env:
- CGO_ENABLED=0
main: ./iam/sync-users/
binary: iam-sync-users
Expand All @@ -126,7 +135,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: iam-auth-proxy
env:
- CGO_ENABLED=0
main: ./iam/auth-proxy/
binary: iam-auth-proxy
Expand All @@ -137,7 +147,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: iam-session
env:
- CGO_ENABLED=0
main: ./iam/session/
binary: iam-session
Expand All @@ -148,7 +159,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: iam-public-ssh-keys
env:
- CGO_ENABLED=0
main: ./iam/public-ssh-keys/
binary: iam-public-ssh-keys
Expand All @@ -159,7 +171,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ecs-dashboard
env:
- CGO_ENABLED=0
main: ./ecs/dashboard/
binary: ecs-dashboard
Expand All @@ -170,7 +183,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ecs-deploy
env:
- CGO_ENABLED=0
main: ./ecs/deploy/
binary: ecs-deploy
Expand All @@ -181,7 +195,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ecs-locate
env:
- CGO_ENABLED=0
main: ./ecs/locate/
binary: ecs-locate
Expand All @@ -192,7 +207,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ecs-run-task
env:
- CGO_ENABLED=0
main: ./ecs/run-task/
binary: ecs-run-task
Expand All @@ -203,7 +219,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: lambda-ping
env:
- CGO_ENABLED=0
main: ./lambda/ping/
binary: lambda-ping
Expand All @@ -214,7 +231,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: lambda-sign-ssh-key
env:
- CGO_ENABLED=0
main: ./lambda/sign-ssh-key/
binary: lambda-sign-ssh-key
Expand All @@ -225,7 +243,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: ecr-get-login
env:
- CGO_ENABLED=0
main: ./ecr/get-login/
binary: ecr-get-login
Expand All @@ -236,7 +255,8 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/hamstah/awstools/common.Version={{.Version}} -X github.com/hamstah/awstools/common.CommitHash={{.ShortCommit}}"
- env:
- id: s3-download
env:
- CGO_ENABLED=0
main: ./s3/download/
binary: s3-download
Expand Down
37 changes: 19 additions & 18 deletions scripts/.goreleaser.yml.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
before:
hooks:
- go mod download
archive:
format: binary
archives:
- id: main
format: binary
checksum:
name_template: 'SHA256SUMS'
changelog:
Expand All @@ -11,23 +9,26 @@ changelog:
exclude:
- '^docs:'
- '^test:'
sign:
signature: "${artifact}.asc"
artifacts: all
args: ["--armor", "--output", "$signature", "--detach-sig", "$artifact"]
nfpm:
vendor: hamstah
homepage: https://github.com/hamstah/awstools
maintainer: Nico Esteves <contact@hamstah.com>
license: MIT
formats:
- deb
- rpm
signs:
-
signature: "${artifact}.asc"
artifacts: all
args: ["--armor", "--output", "$signature", "--detach-sig", "$artifact"]
nfpms:
-
vendor: hamstah
homepage: https://github.com/hamstah/awstools
maintainer: Nico Esteves <contact@hamstah.com>
license: MIT
formats:
- deb
- rpm
release:
draft: true
builds:
{% for build in builds %}
- env:
- id: {{build.name}}
env:
- CGO_ENABLED=0
main: {{build.src}}
binary: {{build.name}}
Expand Down

0 comments on commit 9bf2c61

Please sign in to comment.