From f6a9980e49df40b58ce5a9fe51e16c6759255a23 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Wed, 21 Dec 2022 13:18:09 +0100 Subject: [PATCH] fix: cleanup macOS packaging Don't allow specifying target Add `set -e` to shell scripts Don't try and package on every PR Co-authored-by: Mike McQuaid --- .github/workflows/build-pkg.yml | 3 --- package/scripts/postinstall | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-pkg.yml b/.github/workflows/build-pkg.yml index 244fa66f8c..ddbcdbc22d 100644 --- a/.github/workflows/build-pkg.yml +++ b/.github/workflows/build-pkg.yml @@ -4,9 +4,6 @@ on: paths: - .github/workflows/build-pkg.yml - package/scripts - pull_request: - branches: - - master release: types: - published diff --git a/package/scripts/postinstall b/package/scripts/postinstall index f65f04646d..c0cfffc7b0 100755 --- a/package/scripts/postinstall +++ b/package/scripts/postinstall @@ -1,4 +1,5 @@ #!/bin/bash +set -e # verify the files exist tmp_brew="$2" @@ -8,9 +9,7 @@ if [[ ! -d "${tmp_brew:?}" ]]; then fi # pick the correct target -if [[ "$3" != "/" ]]; then - target=$3 -elif [[ $(uname -m) == "x86_64" ]];then +if [[ $(uname -m) == "x86_64" ]];then target="/usr/local" else target="/opt/Homebrew"