This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
forked from fastly/cli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yml
96 lines (96 loc) · 2.53 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
94
95
96
project_name: fastly
release:
draft: true
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/revision.AppVersion={{ .Version }}"
- -X "github.com/fastly/cli/pkg/revision.GitCommit={{ .ShortCommit }}"
- -X "github.com/fastly/cli/pkg/revision.GoVersion={{ .Env.GOVERSION }}"
id: macos
goos: [darwin]
goarch: [amd64, arm64]
- <<: *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]
binary: 'fastly-usage' # we rename the binary to prevent an error caused by the earlier 'linux/amd64' step
# which already creates a 'fastly' binary in '/usr/local/bin'.
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]
tap:
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:
skip: true