From 9123b3e285e2015622612be3b60b6c0fee4aa9d8 Mon Sep 17 00:00:00 2001 From: Elliot Murphy Date: Tue, 21 Dec 2021 23:11:44 -0500 Subject: [PATCH] fix goreleaser artifact for linux arm build (#242) * fix linux arm release * add discord notifications of releases * fix race condition in post hook * experiment with different sbom settings --- .goreleaser.yml | 31 +++++++++++++++++++++++++++++-- goreleaser-post-hook.sh | 10 ++++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1bd69030..9e6f1911 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,13 +11,40 @@ builds: - windows_amd64 binary: deleterious hooks: - post: ./goreleaser-post-hook.sh + post: + - cmd: ./goreleaser-post-hook.sh + env: + - BUILD_TARGET={{ .Target }} + - ARTIFACT={{ .Path }} + checksum: name_template: 'checksums.txt' sboms: - - artifacts: archive + - artifacts: source + +announce: + discord: + # Whether its enabled or not. + # Defaults to false. + enabled: true + + # Message template to use while publishing. + # Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}` + message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }} or brew upgrade {{ .ProjectName }}' + + # Set author of the embed. + # Defaults to `GoReleaser` + author: 'GoReleaser' + + # Color code of the embed. You have to use decimal numeral system, not hexadecimal. + # Defaults to `3888754` - the grey-ish from goreleaser + color: '' + + # URL to an image to use as the icon for the embed. + # Defaults to `https://goreleaser.com/static/avatar.png` + icon_url: '' brews: - # Repository to push the tap to. diff --git a/goreleaser-post-hook.sh b/goreleaser-post-hook.sh index 9a60b93f..e1d88113 100755 --- a/goreleaser-post-hook.sh +++ b/goreleaser-post-hook.sh @@ -5,9 +5,11 @@ echo "moving bazel outputs to goreleaser dist directory for packaging..." mkdir -p dist/deleterious_darwin_amd64 mkdir -p dist/deleterious_darwin_arm64 mkdir -p dist/deleterious_linux_amd64 +mkdir -p dist/deleterious_linux_arm64 mkdir -p dist/deleterious_windows_amd64 -sudo cp bdist/deleterious-darwin dist/deleterious_darwin_amd64/deleterious -sudo cp bdist/deleterious-darwin-m1 dist/deleterious_darwin_arm64/deleterious -sudo cp bdist/deleterious-linux dist/deleterious_linux_amd64/deleterious -sudo cp bdist/deleterious-windows.exe dist/deleterious_windows_amd64/deleterious.exe +sudo cp -f bdist/deleterious-darwin dist/deleterious_darwin_amd64/deleterious +sudo cp -f bdist/deleterious-darwin-m1 dist/deleterious_darwin_arm64/deleterious +sudo cp -f bdist/deleterious-linux dist/deleterious_linux_amd64/deleterious +sudo cp -f bdist/deleterious-linux-arm dist/deleterious_linux_arm64/deleterious +sudo cp -f bdist/deleterious-windows.exe dist/deleterious_windows_amd64/deleterious.exe