Currently, goreleaser injects the date that includes time & timezone information, but this is visually noisy. This configures it to inject the simpler `2019-12-16` date format into the build, which also matches what our Makefile does in development.
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
# Make sure to check the documentation at http://goreleaser.com
|
|
project_name: gh
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
builds:
|
|
- binary: bin/gh
|
|
ldflags:
|
|
- -s -w -X github.com/github/gh-cli/command.Version={{.Version}} -X github.com/github/gh-cli/command.BuildDate={{time "2006-01-02"}}
|
|
- -X github.com/github/gh-cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
|
|
- -X github.com/github/gh-cli/context.oauthClientSecret={{.Env.GH_OAUTH_CLIENT_SECRET}}
|
|
- -X main.updaterEnabled=github/homebrew-gh
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
archives:
|
|
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
|
|
wrap_in_directory: true
|
|
replacements:
|
|
darwin: macOS
|
|
format: tar.gz
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
|
|
nfpms:
|
|
- license: MIT
|
|
maintainer: GitHub
|
|
homepage: https://github.com/github/gh-cli
|
|
bindir: /usr/local
|
|
dependencies:
|
|
- git
|
|
formats:
|
|
- deb
|
|
- rpm
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|