Skip to content

Commit d62e782

Browse files
committed
ci: switch goreleaser to use brew casks instead of formulas
1 parent 0b06dc3 commit d62e782

3 files changed

Lines changed: 38 additions & 17 deletions

File tree

.goreleaser.yaml

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ before:
88
- rustup default stable
99
- cargo install --force --locked cargo-zigbuild
1010

11-
brews:
12-
- name: cargo-feature-combinations
11+
homebrew_casks:
12+
- name: &cargo-feature-combinations cargo-feature-combinations
1313
ids:
14-
- cargo-feature-combinations
14+
- *cargo-feature-combinations
1515
description: "Plugin for `cargo` to run commands against selected combinations of features."
16-
directory: Formula
16+
directory: Casks
17+
conflicts:
18+
- formula: *cargo-feature-combinations
1719
commit_author:
1820
name: romnn
1921
email: contact@romnn.com
@@ -24,11 +26,19 @@ brews:
2426
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
2527
pull_request:
2628
enabled: false
27-
- name: cargo-fc
29+
hooks:
30+
post:
31+
install: |
32+
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
33+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/cargo-feature-combinations"]
34+
end
35+
- name: &cargo-fc cargo-fc
2836
ids:
29-
- cargo-fc
37+
- *cargo-fc
3038
description: "Plugin for `cargo` to run commands against selected combinations of features."
31-
directory: Formula
39+
directory: Casks
40+
conflicts:
41+
- formula: *cargo-fc
3242
commit_author:
3343
name: romnn
3444
email: contact@romnn.com
@@ -39,12 +49,18 @@ brews:
3949
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
4050
pull_request:
4151
enabled: false
52+
hooks:
53+
post:
54+
install: |
55+
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
56+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/cargo-fc"]
57+
end
4258
4359
builds:
4460
# cargo-feature-combinations binary
45-
- id: "cargo-feature-combinations"
61+
- id: *cargo-feature-combinations
4662
builder: rust
47-
binary: cargo-feature-combinations
63+
binary: *cargo-feature-combinations
4864
targets:
4965
# linux
5066
- x86_64-unknown-linux-musl
@@ -65,9 +81,9 @@ builds:
6581
- "--target-dir=./target" # TODO: can we remove this once rust support is better?
6682

6783
# cargo-fc binary
68-
- id: "cargo-fc"
84+
- id: *cargo-fc
6985
builder: rust
70-
binary: cargo-fc
86+
binary: *cargo-fc
7187
targets:
7288
# linux
7389
- x86_64-unknown-linux-musl
@@ -88,21 +104,21 @@ builds:
88104
- "--target-dir=./target" # TODO: can we remove this once rust support is better?
89105

90106
archives:
91-
- id: cargo-feature-combinations
107+
- id: *cargo-feature-combinations
92108
formats: ["tar.gz"]
93109
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
94110
ids:
95-
- cargo-feature-combinations
111+
- *cargo-feature-combinations
96112
files:
97113
- LICENSE
98114
format_overrides:
99115
- goos: windows
100116
formats: ["zip"]
101-
- id: cargo-fc
117+
- id: *cargo-fc
102118
formats: ["tar.gz"]
103119
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
104120
ids:
105-
- cargo-fc
121+
- *cargo-fc
106122
files:
107123
- LICENSE
108124
format_overrides:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

taskfile.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ tasks:
1717
cmds:
1818
- cargo build --all-targets {{.CLI_ARGS}}
1919

20+
build:fc:
21+
desc: "build in debug mode for all combinations of features"
22+
cmds:
23+
- cargo fc build --all-targets {{.CLI_ARGS}}
24+
2025
build:release:
2126
desc: "build in release mode"
2227
cmds:
@@ -59,7 +64,7 @@ tasks:
5964
- cargo check --workspace --all-targets {{.CLI_ARGS}}
6065

6166
check:fc:
62-
desc: "check cargo workspace"
67+
desc: "check cargo workspace for all combinations of features"
6368
dir: "{{.ROOT_DIR}}"
6469
cmds:
6570
- cargo fc check --workspace --all-targets {{.CLI_ARGS}}

0 commit comments

Comments
 (0)