Skip to content

Commit 6cd7bb0

Browse files
pennypacker-hejoecorall
authored andcommitted
[skip-release] Remove supported GoReleaser deprecations
1 parent 404de7a commit 6cd7bb0

2 files changed

Lines changed: 34 additions & 5 deletions

File tree

.github/workflows/release-config.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,35 @@ jobs:
3131
install-only: true
3232

3333
- name: Validate release configuration
34+
shell: bash
3435
env:
3536
GORELEASER_DISABLE_SCM_RELEASE: "false"
36-
run: goreleaser check
37+
run: |
38+
set -euo pipefail
39+
40+
set +e
41+
output="$(goreleaser check 2>&1)"
42+
status=$?
43+
set -e
44+
45+
printf '%s\n' "$output"
46+
47+
if [[ "$status" -eq 0 ]]; then
48+
exit 0
49+
fi
50+
51+
if [[ "$status" -ne 2 ]]; then
52+
exit "$status"
53+
fi
54+
55+
plain_output="$(printf '%s\n' "$output" | sed $'s/\033\\[[0-9;]*m//g')"
56+
if ! grep -Fq "configuration is valid, but uses deprecated properties" <<<"$plain_output"; then
57+
echo "GoReleaser did not report a valid deprecated configuration" >&2
58+
exit 1
59+
fi
60+
61+
mapfile -t deprecations < <(grep -F "DEPRECATED:" <<<"$plain_output" || true)
62+
if [[ "${#deprecations[@]}" -ne 1 ]] || [[ "${deprecations[0]}" != *brews* ]]; then
63+
echo "Only the reviewed brews deprecation is allowed" >&2
64+
exit 1
65+
fi

.goreleaser.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ builds:
1717
- darwin
1818

1919
archives:
20-
- format: tar.gz
20+
- formats: [tar.gz]
2121
# this name template makes the OS and Arch compatible with the results of uname.
2222
name_template: >-
2323
{{ .ProjectName }}_
@@ -29,11 +29,11 @@ archives:
2929
# use zip for windows archives
3030
format_overrides:
3131
- goos: windows
32-
format: zip
32+
formats: [zip]
3333
checksum:
3434
name_template: "checksums.txt"
3535
snapshot:
36-
name_template: "{{ incpatch .Version }}-next"
36+
version_template: "{{ incpatch .Version }}-next"
3737
changelog:
3838
sort: asc
3939
filters:
@@ -76,7 +76,7 @@ nfpms:
7676
- deb
7777
- rpm
7878
mtime: "{{ .CommitDate }}"
79-
builds:
79+
ids:
8080
- sitectl-drupal
8181
dependencies:
8282
- sitectl

0 commit comments

Comments
 (0)