forked from blacktop/ipsw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
462 lines (444 loc) · 12.8 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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
before:
hooks:
- go mod tidy
- go generate ./...
- ./hack/make/completions
- ./hack/make/manpages
- ./hack/make/json_mini
snapshot:
name_template: '{{ incpatch .Version }}-next'
builds:
- id: darwin_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
goos:
- darwin
goarch:
- amd64
- arm64
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
- id: darwin_ios_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CC=$GOROOT/misc/ios/clangwrap.sh
goos:
- ios
goarch:
- arm64
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
hooks:
post:
- ./hack/make/codesign {{ .Path }}
- id: darwin_amd64_extras_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CGO_LDFLAGS=-L/usr/local/homebrew/lib -framework IOKit
- CGO_CFLAGS=-I/usr/local/homebrew/include
- CC=sandbox-exec -f $PWD/hack/goreleaser/profile.sb cc
goos:
- darwin
goarch:
- amd64
tags:
- libusb
- unicorn
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
hooks:
post:
- ./hack/make/delete-all-rpaths {{ .Path }}
- id: darwin_arm64_extras_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CGO_LDFLAGS=-L/opt/homebrew/lib -framework IOKit
- CGO_CFLAGS=-I/opt/homebrew/include
- CC=sandbox-exec -f $PWD/hack/goreleaser/profile.sb cc
goos:
- darwin
goarch:
- arm64
tags:
- libusb
- unicorn
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
hooks:
post:
- ./hack/make/delete-all-rpaths {{ .Path }}
- id: linux_amd64_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CC=zig cc -target x86_64-linux-musl
- CC=zig c++ -target x86_64-linux-musl
goos:
- linux
goarch:
- amd64
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
- id: linux_arm64_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CC=zig cc -target aarch64-linux-musl
- CC=zig c++ -target aarch64-linux-musl
goos:
- linux
goarch:
- arm64
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
# - id: linux_amd64_extras_build
# hooks:
# pre:
# - hack/make/libusb x86_64
# - hack/make/unicorn x86_64
# post:
# - /opt/homebrew/opt/llvm/bin/llvm-strip {{ .Path }}
# main: ./cmd/ipsw
# binary: ipsw
# env:
# - CGO_ENABLED=1
# - CC=zig cc -target x86_64-linux-musl
# - CC=zig c++ -target x86_64-linux-musl
# - CGO_LDFLAGS=-L/tmp/install_x86_64/usr/local/lib
# - PKG_CONFIG_PATH=/tmp/install_x86_64/usr/local/lib/pkgconfig
# - CGO_CFLAGS=-I/tmp/install_x86_64/usr/local/include/libusb-1.0 -I/tmp/install_x86_64/usr/local/include
# tags:
# - libusb
# - unicorn
# goos:
# - linux
# goarch:
# - amd64
# mod_timestamp: "{{ .CommitTimestamp }}"
# flags:
# - -trimpath
# ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
# - id: linux_arm64_extras_build
# hooks:
# pre:
# - hack/make/libusb aarch64
# - hack/make/unicorn aarch64
# post:
# - /opt/homebrew/opt/llvm/bin/llvm-strip {{ .Path }}
# main: ./cmd/ipsw
# binary: ipsw
# env:
# - CGO_ENABLED=1
# - CC=zig cc -target aarch64-linux-musl
# - CC=zig c++ -target aarch64-linux-musl
# - CGO_LDFLAGS=-L/tmp/install_aarch64/usr/local/lib
# - PKG_CONFIG_PATH=/tmp/install_aarch64/usr/local/lib/pkgconfig
# - CGO_CFLAGS=-I/tmp/install_aarch64/usr/local/include/libusb-1.0 -I/tmp/install_aarch64/usr/local/include
# tags:
# - libusb
# - unicorn
# goos:
# - linux
# goarch:
# - arm64
# mod_timestamp: "{{ .CommitTimestamp }}"
# flags:
# - -trimpath
# ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
- id: windows_amd64_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CC=zig cc -target x86_64-windows-gnu
- CC=zig c++ -target x86_64-windows-gnu
goos:
- windows
goarch:
- amd64
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
- id: windows_arm64_build
main: ./cmd/ipsw
binary: ipsw
env:
- CGO_ENABLED=1
- CC=zig cc -target aarch64-windows-gnu
- CC=zig c++ -target aarch64-windows-gnu
goos:
- windows
goarch:
- arm64
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags: -s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion={{.Version}} -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildTime={{.Date}}
universal_binaries:
- id: darwin_build
replace: false
archives:
- id : default_archive
builds:
- darwin_build
- darwin_ios_build
- darwin_universal
- linux_amd64_build
- linux_arm64_build
- windows_amd64_build
- windows_arm64_build
replacements:
darwin: macOS
amd64: x86_64
all: universal
files:
- README.md
- LICENSE
- completions/*
- manpages/*
wrap_in_directory: true
- id : extras_archive
builds:
- darwin_amd64_extras_build
- darwin_arm64_extras_build
# - linux_amd64_extras_build
# - linux_arm64_extras_build
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}_extras"
replacements:
darwin: macOS
amd64: x86_64
files:
- README.md
- LICENSE
- completions/*
- manpages/*
wrap_in_directory: true
brews:
- tap:
owner: blacktop
name: homebrew-tap
ids:
- extras_archive
folder: Formula
homepage: "https://github.com/blacktop/ipsw"
description: "iOS/macOS Research Swiss Army Knife"
license: MIT
dependencies:
- name: bat
type: optional
- name: libusb
type: optional
- name: unicorn
type: optional
install: |
bin.install "ipsw"
bash_completion.install "completions/_bash" => "ipsw"
zsh_completion.install "completions/_zsh" => "_ipsw"
fish_completion.install "completions/_fish" => "ipsw.fish"
man1.install Dir["manpages/*"]
test: |
system "#{bin}/ipsw --version"
checksum:
name_template: "checksums.txt"
signs:
- artifacts: checksum
sboms:
- artifacts: archive
nfpms:
- id: packages
builds:
- linux_amd64_build
- linux_arm64_build
homepage: https://github.com/blacktop/ipsw
description: |-
iOS/macOS Research Swiss Army Knife.
maintainer: Blacktop <https://github.com/blacktop>
license: MIT
vendor: Blacktop
bindir: /usr/bin
section: utils
contents:
- src: ./completions/_bash
dst: /usr/share/bash-completion/completions/ipsw
file_info:
mode: 0644
- src: ./completions/_fish
dst: /usr/share/fish/completions/ipsw.fish
file_info:
mode: 0644
- src: ./completions/_zsh
dst: /usr/share/zsh/vendor-completions/_ipsw
file_info:
mode: 0644
- src: ./manpages/ipsw.1.gz
dst: /usr/share/man/man1/ipsw.1.gz
file_info:
mode: 0644
- src: ./LICENSE
dst: /usr/share/doc/ipsw/copyright
file_info:
mode: 0644
replacements:
amd64: x86_64
formats:
- apk
- deb
- rpm
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
# - id: packages_extras
# file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}_extras"
# builds:
# - linux_amd64_extras_build
# - linux_arm64_extras_build
# homepage: https://github.com/blacktop/ipsw
# description: |-
# iOS/macOS Research Swiss Army Knife.
# maintainer: Blacktop <https://github.com/blacktop>
# license: MIT
# vendor: Blacktop
# bindir: /usr/bin
# section: utils
# contents:
# - src: ./completions/_bash
# dst: /usr/share/bash-completion/completions/ipsw
# file_info:
# mode: 0644
# - src: ./completions/_fish
# dst: /usr/share/fish/completions/ipsw.fish
# file_info:
# mode: 0644
# - src: ./completions/_zsh
# dst: /usr/share/zsh/vendor-completions/_ipsw
# file_info:
# mode: 0644
# - src: ./manpages/ipsw.1.gz
# dst: /usr/share/man/man1/ipsw.1.gz
# file_info:
# mode: 0644
# - src: ./LICENSE
# dst: /usr/share/doc/ipsw/copyright
# file_info:
# mode: 0644
# replacements:
# amd64: x86_64
# formats:
# - apk
# - deb
# - rpm
# deb:
# lintian_overrides:
# - statically-linked-binary
# - changelog-file-missing-in-native-package
snapcrafts:
- id: snaps
builds:
- linux_amd64_build
- linux_arm64_build
# - linux_amd64_extras_build
# - linux_arm64_extras_build
summary: iOS/macOS Research Swiss Army Knife.
description: |
iOS/macOS Research Swiss Army Knife.
grade: stable
confinement: strict
publish: true
license: MIT
aurs:
- homepage: https://github.com/blacktop/ipsw
description: iOS/macOS Research Swiss Army Knife
maintainers:
- 'Blacktop <https://github.com/blacktop>'
license: MIT
private_key: /Users/blacktop/.ssh/aur
git_url: 'ssh://aur@aur.archlinux.org/ipsw-bin.git'
package: |-
# bin
install -Dm755 "./ipsw" "${pkgdir}/usr/bin/ipsw"
# license
install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/ipsw/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/ipsw" "${pkgdir}/usr/share/bash-completion/completions/ipsw"
install -Dm644 "./completions/_ipsw" "${pkgdir}/usr/share/zsh/site-functions/_ipsw"
install -Dm644 "./completions/ipsw.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/ipsw.fish"
# man pages
install -Dm644 "./manpages/ipsw.1.gz" "${pkgdir}/usr/share/man/man1/ipsw.1.gz"
scoop:
bucket:
owner: blacktop
name: scoop-bucket
homepage: https://blacktop.github.io/ipsw
description: iOS/macOS Research Swiss Army Knife
license: MIT
changelog:
sort: asc
use: github
groups:
- title: 'New Features'
regexp: "^.*feat[(\\w)]*:+.*$"
order: 100
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 200
- title: Dependency updates
regexp: "^.*chore\\(deps\\)*:+.*$"
order: 300
- title: 'Documentation updates'
regexp: "^.*docs[(\\w)]*:+.*$"
order: 400
- title: Other work
order: 9999
filters:
exclude:
- "^docs:"
- "^test:"
- "^bumping"
- "^Update"
- "^Delete"
- "^Working"
- "reorg"
- "updates"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
release:
target_commitish: '{{ .Commit }}'
footer: |
### Summary
**Full Changelog**: https://github.com/blacktop/ipsw/compare/{{ .PreviousTag }}...{{ .Tag }}
## What to do next?
- Read the [documentation](https://blacktop.github.io/ipsw/docs/)
- Join our [Discord server](https://discord.gg/P3ukGGxc)
- Follow us on [Twitter](https://twitter.com/blacktop__)
announce:
discord:
enabled: true
message_template: '`ipsw` {{ .Tag }} is out! Check it out: https://github.com/blacktop/ipsw/releases/tag/{{ .Tag }}'