forked from fastly/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
147 lines (143 loc) · 4.43 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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=v{{ .Version }}"
- -X "github.com/fastly/cli/pkg/revision.GitCommit={{ .ShortCommit }}"
- -X "github.com/fastly/cli/pkg/revision.GoHostOS={{ .Env.GOHOSTOS }}"
- -X "github.com/fastly/cli/pkg/revision.GoHostArch={{ .Env.GOHOSTARCH }}"
- -X "github.com/fastly/cli/pkg/revision.Environment=release"
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, arm64]
- <<: *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
aurs:
-
homepage: "https://github.com/fastly/cli"
description: "A CLI for interacting with the Fastly platform"
maintainers:
- 'oss@fastly.com'
license: "Apache license 2.0"
skip_upload: auto
provides:
- fastly
conflicts:
- fastly
# The SSH private key that should be used to commit to the Git repository.
# This can either be a path or the key contents.
#
# WARNING: do not expose your private key in the config file!
private_key: '{{ .Env.AUR_KEY }}'
# The AUR Git URL for this package.
# Defaults to empty.
git_url: 'ssh://aur@aur.archlinux.org/fastly-bin.git'
# List of packages that are not needed for the software to function,
# but provide additional features.
#
# Must be in the format `package: short description of the extra functionality`.
#
# Defaults to empty.
optdepends:
- 'viceroy: for running service locally'
# The value to be passed to `GIT_SSH_COMMAND`.
#
#
# Defaults to `ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null`.
git_ssh_command: 'ssh -i {{ .KeyPath }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -F /dev/null'
brews:
- name: fastly
ids: [nix]
tap:
owner: fastly
name: homebrew-tap
skip_upload: auto
description: A CLI for interacting with the Fastly platform
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
checksum:
name_template: "{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
skip: true
# dockers:
# - <<: &build_opts
# use: buildx
# goos: linux
# goarch: amd64
# image_templates:
# - "ghcr.io/fastly/cli:{{ .Version }}"
# build_flag_templates:
# - "--platform=linux/amd64"
# - --label=title={{ .ProjectName }}
# - --label=description={{ .ProjectName }}
# - --label=url=https://github.com/fastly/cli
# - --label=source=https://github.com/fastly/cli
# - --label=version={{ .Version }}
# - --label=created={{ time "2006-01-02T15:04:05Z07:00" }}
# - --label=revision={{ .FullCommit }}
# - --label=licenses=Apache-2.0
# dockerfile: Dockerfile-assemblyscript
# - <<: *build_opts
# dockerfile: Dockerfile-rust