-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
269 lines (258 loc) · 9.07 KB
/
Copy path.goreleaser.yaml
File metadata and controls
269 lines (258 loc) · 9.07 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
version: 2
pro: true
project_name: qodana
builds:
- id: cli
binary: qodana
main: ./cli
env:
- CGO_ENABLED=0
- TARGETOS={{.Os}}
- TARGETARCH={{.Arch}}
ldflags:
- -X github.com/JetBrains/qodana-cli/internal/platform/version.Version={{ .Version }}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
hooks:
pre:
- cmd: go generate -v ./cli/... ./internal/...
post:
- cmd: |
bash -c "
set -e;
if [ '{{ .IsSnapshot }}' = 'false' -a '{{ .Os }}' = `go env GOOS` -a '{{ .Arch }}' = `go env GOARCH` ];
then ver=\$(chmod +x {{ .Path }}; {{ .Path }} -v | grep 'qodana version *');
if [ \"\$ver\" != 'qodana version {{ .Version }}' ];
then echo 'Version check failed – expected {{ .Version }} but got '\$ver;
exit 1;
fi;
fi"
output: true
- cmd: |
sh -c "
set -e;
if [ '{{ .IsSnapshot }}' = 'false' -a '{{ .Os }}' != 'linux' -a \"\$SIGN\" = 'true' ];
then codesign {{ if eq .Os "darwin" }}-denoted-content-type=application/x-mac-app-bin{{ end }} -signed-files-dir=./dist/cli_{{ .Os }}_{{ .Arch }}{{ if eq .Arch "amd64" }}_v1{{ end }}{{ if eq .Arch "arm64" }}_v8.0{{ end }}/ './dist/cli_{{ .Os }}_{{ .Arch }}{{ if eq .Arch "amd64" }}_v1{{ end }}{{ if eq .Arch "arm64" }}_v8.0{{ end }}/qodana{{ if eq .Os "windows" }}.exe{{ end }}' ;
fi;
mkdir -p dist/upload;
cp {{ .Path }} dist/upload/qodana_{{ .Os }}_{{ if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}{{ if eq .Os "windows" }}.exe{{ end }}"
output: true
- id: clang
skip: "{{ .IsNightly }}"
binary: qodana-clang
main: ./clang
env:
- CGO_ENABLED=0
- TARGETOS={{.Os}}
- TARGETARCH={{.Arch}}
- VERSION={{ envOrDefault "VERSION" "DEV" }}
ldflags:
- -s -w -X main.version={{ .Env.VERSION }} -X main.buildDateStr={{ .Date }}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
hooks:
pre:
- cmd: go generate -v ./clang/... ./internal/...
post:
- cmd: go run ./scripts/sign.go clang qodana-clang
- id: cdnet
skip: "{{ .IsNightly }}"
binary: qodana-cdnet
main: ./cdnet
env:
- CGO_ENABLED=0
- TARGETOS={{.Os}}
- TARGETARCH={{.Arch}}
- VERSION={{ envOrDefault "VERSION" "DEV" }}
ldflags:
- -s -w -X main.version={{ .Env.VERSION }} -X main.buildDateStr={{ .Date }}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
hooks:
pre:
- cmd: go generate -v ./cdnet/... ./internal/...
post:
- cmd: go run ./scripts/sign.go cdnet qodana-cdnet
archives:
- id: cli
builds:
- cli
name_template: '{{ .ProjectName }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}'
format_overrides:
- goos: windows
formats: [ 'zip' ]
- id: clang
builds:
- clang
formats: [ 'binary' ]
name_template: "qodana-clang_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- id: cdnet
builds:
- cdnet
formats: [ 'binary' ]
name_template: "qodana-cdnet_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
nfpms:
- vendor: "JetBrains s.r.o."
homepage: "https://github.com/JetBrains/qodana-cli"
maintainer: "Qodana <qodana-support@jetbrains.com>"
description: "🔧 Run Qodana as fast as possible, with minimum effort required"
license: "Apache-2.0"
builds:
- cli
formats:
- apk
- deb
- rpm
- termux.deb
- archlinux
dependencies:
- git
brews:
- repository:
owner: JetBrains
name: homebrew-utils
commit_author:
name: "qodana-bot"
email: "qodana-support@jetbrains.com"
commit_msg_template: ":sparkles: Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
directory: Formula
homepage: "https://github.com/JetBrains/qodana-cli"
description: "🔧 Run Qodana as fast as possible, with minimum effort required"
license: "Apache-2.0"
ids:
- cli
scoops:
- repository:
owner: "JetBrains"
name: "scoop-utils"
commit_author:
name: "qodana-bot"
email: "qodana-support@jetbrains.com"
commit_msg_template: ":sparkles: Scoop update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/JetBrains/qodana-cli"
description: "🔧 Run Qodana as fast as possible, with minimum effort required"
license: "Apache-2.0"
ids:
- cli
chocolateys:
- name: qodana
title: "Qodana CLI"
authors: "JetBrains"
project_url: "https://github.com/JetBrains/qodana-cli/"
icon_url: 'https://resources.jetbrains.com/storage/products/company/brand/logos/Qodana_icon.png'
copyright: "2023 JetBrains"
license_url: "https://github.com/JetBrains/qodana-cli/blob/main/LICENSE"
require_license_acceptance: false
project_source_url: "https://github.com/JetBrains/qodana-cli"
docs_url: "https://github.com/JetBrains/qodana-cli/blob/main/README.md"
bug_tracker_url: "https://github.com/JetBrains/qodana-cli/issues"
tags: "code-quality jetbrains static-analysis"
summary: "🔧 Run Qodana as fast as possible, with minimum effort required"
description: |
{{ .ProjectName }} is a simple cross-platform command-line tool to run Qodana linters anywhere with minimum effort required.
release_notes: "https://github.com/JetBrains/qodana-cli/releases/tag/v{{ .Version }}"
api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
source_repo: "https://push.chocolatey.org/"
ids:
- cli
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ incpatch .Version }}-next"
release:
extra_files:
- glob: dist/upload/**
footer: |
## Install
> 💡 The Qodana CLI is distributed and run as a binary. The Qodana linters with inspections are [Docker Images](https://www.jetbrains.com/help/qodana/docker-images.html) or, starting from version `2023.2`, your local/downloaded by CLI IDE installations (experimental support).
> - To run Qodana with a container (the default mode in CLI), you must have Docker or Podman installed and running locally to support this: https://www.docker.com/get-started, and, if you are using Linux, you should be able to run Docker from the current (non-root) user (https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
> - To run Qodana without a container, you must have the IDE installed locally to provide the IDE installation path to the CLI or specify the product code, and CLI will try to download the IDE automatically (experimental support).
#### macOS and Linux
##### Install with [Homebrew](https://brew.sh) (recommended)
```console
brew install jetbrains/utils/qodana
```
##### Install with our installer
```console
curl -fsSL https://jb.gg/qodana-cli/install | bash
```
Also, you can install `nightly` or any other version (e.g. `v2023.2.9`) the following way:
```
curl -fsSL https://jb.gg/qodana-cli/install | bash -s -- nightly
```
#### Windows
##### Install with [Windows Package Manager](https://learn.microsoft.com/en-us/windows/package-manager/winget/) (recommended)
```console
winget install -e --id JetBrains.QodanaCLI
```
##### Install with [Chocolatey](https://chocolatey.org)
```console
choco install qodana
```
##### Install with [Scoop](https://scoop.sh)
```console
scoop bucket add jetbrains https://github.com/JetBrains/scoop-utils
scoop install qodana
```
#### Anywhere else
Alternatively, you can install the latest binary (or the apt/rpm/deb/archlinux package) from this page.
## Update
Update to the latest version depends on how you choose to install `qodana` on your machine.
#### Update with [Homebrew](https://brew.sh)
```console
brew upgrade qodana
```
#### Update with [Scoop](https://scoop.sh)
```console
scoop update qodana
```
#### Update with [Chocolatey](https://chocolatey.org)
```console
choco upgrade qodana
```
#### Update on Linux and macOS with the installer script
```console
curl -fsSL https://jb.gg/qodana-cli/install | bash
```
Alternatively, you can grab the latest binary (or the apt/rpm/deb package) from this page.
changelog:
sort: asc
filters:
exclude:
- '^:memo:'
- '^:bricks:'
- '^:recycle:'
git:
ignore_tags:
- nightly
- 'v*-nightly'
report_sizes: true
nightly:
version_template: '{{ .Env.NIGHTLY_VERSION }}'
tag_name: nightly
publish_release: true
keep_single_release: true
after:
hooks:
- sh -c "
set -e;
if [ '{{ .IsSnapshot }}' = 'false' -a \"\$SIGN\" = 'true' ];
then
codesign -gpg-key $FINGERPRINT -signed-files-dir=./dist/ dist/checksums.txt;
gh release --repo JetBrains/qodana-cli upload {{ if .IsNightly }}{{ .Tag }}{{ else }}v{{ .Version}}{{ end }} dist/checksums.txt.asc;
fi"