forked from fastly/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
93 lines (93 loc) · 2.31 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
project_name: fastly
release:
prerelease: auto
extra_files:
- glob: "dist/usage.json"
before:
hooks:
- go mod tidy
- go mod download
builds:
- <<: &build_defaults
main: ./cmd/fastly
ldflags:
- -s -w -X "github.com/fastly/cli/pkg/version.AppVersion={{ .Version }}"
- -X "github.com/fastly/cli/pkg/version.GitRevision={{ .ShortCommit }}"
- -X "github.com/fastly/cli/pkg/version.GoVersion={{ .Env.GOVERSION }}"
id: macos
goos: [darwin]
goarch: [amd64]
- <<: *build_defaults
id: linux
goos: [linux]
goarch: [386, amd64, arm64]
- <<: *build_defaults
id: windows
goos: [windows]
goarch: [386, amd64]
- <<: *build_defaults
id: generate-usage
goos: [linux]
goarch: [amd64]
hooks:
post:
- cmd: "scripts/documentation.sh {{ .Path }}"
archives:
- id: nix
builds: [macos, linux]
<<: &archive_defaults
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- none*
wrap_in_directory: false
format: tar.gz
- id: windows
builds: [windows]
<<: *archive_defaults
wrap_in_directory: false
format: zip
brews:
- name: fastly
ids: [nix]
github:
owner: fastly
name: homebrew-tap
skip_upload: auto
description: Fastly CLI
homepage: https://github.com/fastly/cli
folder: Formula
custom_block: |
head do
url "https://github.com/fastly/cli.git"
depends_on "go"
end
install: |
system "make" if build.head?
bin.install "fastly"
(bash_completion/"fastly.sh").write `#{bin}/fastly --completion-script-bash`
(zsh_completion/"_fastly").write `#{bin}/fastly --completion-script-zsh`
test: |
help_text = shell_output("#{bin}/fastly --help")
assert_includes help_text, "Usage:"
nfpms:
- license: Apache 2.0
maintainer: Fastly
homepage: https://github.com/fastly/cli
bindir: /usr/local/bin
formats:
- deb
- rpm
scoop:
bucket:
owner: fastly
name: scoop-cli
homepage: https://github.com/fastly/cli
skip_upload: auto
description: Fastly CLI
license: Apache 2.0
checksum:
name_template: "{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc