forked from Checkmarx/ast-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
148 lines (140 loc) · 3.3 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
148
project_name: ast-cli
release:
name_template: 'Checkmarx One CLI {{.Version}}'
builds:
- main: ./cmd/main.go
env:
- CGO_ENABLED=0
binary: cx
id: cx
goos:
- linux
- windows
goarch:
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
- goos: linux
goarm: 7
- goos: windows
goarm: 7
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
ldflags:
- -s
- -w
- -X github.com/checkmarx/ast-cli/internal/params.Version={{.Version}}
- main: ./cmd/main.go
env:
- CGO_ENABLED=0
binary: cx
id: cx-mac-universal
goos:
- darwin
goarch:
- amd64
- arm
- arm64
ldflags:
- -s
- -w
- -X github.com/checkmarx/ast-cli/internal/params.Version={{.Version}}
dockers:
- use: docker
dockerfile: Dockerfile
image_templates:
- "cxsdlc/ast-cli:latest"
- "cxsdlc/ast-cli:{{ .Tag }}"
- "checkmarx/ast-cli:latest"
- "checkmarx/ast-cli:{{ .Tag }}"
archives:
- id: cx
builds:
- cx
format_overrides:
- goos: windows
format: zip
replacements:
amd64: x64
386: x32
files:
- LICENSE
- id: cx-latest
builds:
- cx
format_overrides:
- goos: windows
format: zip
replacements:
amd64: x64
386: x32
files:
- LICENSE
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- id: cx-mac-universal
builds:
- cx-mac-universal
files:
- LICENSE
- ./dist/cx-mac-universal_darwin_all/cx.dmg
name_template: "{{ .ProjectName }}_{{ .Version }}_darwin_x64"
- id: cx-mac-universal-latest
builds:
- cx-mac-universal
files:
- LICENSE
- ./dist/cx-mac-universal_darwin_all/cx.dmg
name_template: "{{ .ProjectName }}_darwin_x64"
universal_binaries:
- id: cx-mac-universal
replace: true
name_template: "cx"
hooks:
post: gon gonMac.hcl
brews:
- tap:
owner: checkmarx
name: homebrew-ast-cli
token: "{{ .Env.GO_BOT_TOKEN }}"
ids:
- cx
- cx-mac-universal
folder: Formula
homepage: https://github.com/Checkmarx/ast-cli
description: CLI for Checkmarx One
license: Apache
test: |
system "#{bin}/cx version"
install: |-
bin.install "cx"
# Install bash completion
output = Utils.popen_read("#{bin}/cx utils completion -s bash")
(bash_completion/"cx").write output
# Install zsh completion
output = Utils.popen_read("#{bin}/cx utils completion -s zsh")
(zsh_completion/"_cx").write output
# Install fish completion
output = Utils.popen_read("#{bin}/cx utils completion -s fish")
(fish_completion/"cx.fish").write output
blobs:
- provider: s3
region: "{{ .Env.S3_BUCKET_REGION }}"
bucket: "{{ .Env.S3_BUCKET_NAME }}"
folder: "CxOne/CLI/{{ .Tag }}"
ids:
- cx
- cx-mac-universal
- provider: s3
region: "{{ .Env.S3_BUCKET_REGION }}"
bucket: "{{ .Env.S3_BUCKET_NAME }}"
folder: "CxOne/CLI/latest"
ids:
- cx-latest
- cx-mac-universal-latest
changelog:
use: github-native