diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 000264a..7f68776 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,6 @@ jobs: start: runs-on: macos-14 steps: - # Logs event details and sets `DRY_RUN` env var # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable # https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=published#release @@ -52,7 +51,6 @@ jobs: runs-on: macos-14 needs: start steps: - - uses: actions/checkout@v4 with: # A fetch-depth of 0 includes all history and tags for script/version @@ -84,7 +82,6 @@ jobs: runs-on: macos-14 needs: start steps: - - uses: actions/checkout@v4 with: # A fetch-depth of 0 includes all history and tags for script/version @@ -103,7 +100,6 @@ jobs: runs-on: macos-14 needs: [start, homebrew-core] steps: - - uses: actions/checkout@v4 with: # A fetch-depth of 0 includes all history and tags for script/version diff --git a/script/bootstrap b/script/bootstrap index 426a97e..e6aac8e 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -41,7 +41,6 @@ main() { brew bundle install --verbose fi - if [[ ! -x "$(command -v mise)" ]]; then brew install mise fi diff --git a/script/bottle b/script/bottle index 9acb396..8d65637 100755 --- a/script/bottle +++ b/script/bottle @@ -46,25 +46,25 @@ echo "CURRENT_OS_VERSION_MAJOR: ${CURRENT_OS_VERSION_MAJOR}" echo "CURRENT_OS_VERSION_MINOR: ${CURRENT_OS_VERSION_MINOR}" case "${CURRENT_OS_VERSION_MAJOR}" in -14) - CURRENT_PLATFORM=sonoma - ;; -13) - CURRENT_PLATFORM=ventura - ;; -12) - CURRENT_PLATFORM=monterey - ;; -11) - CURRENT_PLATFORM=big_sur - ;; -10) - CURRENT_PLATFORM=catalina - ;; -*) - echo "Unsupported macOS version. This script requires Catalina or better." - exit 1 - ;; + 14) + CURRENT_PLATFORM=sonoma + ;; + 13) + CURRENT_PLATFORM=ventura + ;; + 12) + CURRENT_PLATFORM=monterey + ;; + 11) + CURRENT_PLATFORM=big_sur + ;; + 10) + CURRENT_PLATFORM=catalina + ;; + *) + echo "Unsupported macOS version. This script requires Catalina or better." + exit 1 + ;; esac # Prefix platform with architecture diff --git a/script/brew_build_interactive b/script/brew_build_interactive index 90947b0..654bb49 100755 --- a/script/brew_build_interactive +++ b/script/brew_build_interactive @@ -8,4 +8,4 @@ HOMEBREW_NO_INSTALL_FROM_API=1 \ brew reinstall \ - --interactive mas + --interactive mas diff --git a/script/brew_core_update b/script/brew_core_update index 2297ead..feed52a 100755 --- a/script/brew_core_update +++ b/script/brew_core_update @@ -46,7 +46,7 @@ while getopts "d" o; do ;; esac done -shift $((OPTIND-1)) +shift $((OPTIND - 1)) # DRY_RUN environment variable # shellcheck disable=SC2153 @@ -128,8 +128,8 @@ cp -v "${LOCAL_MAS_FORMULA_PATH}" "${CORE_MAS_FORMULA_PATH}" HOMEBREW_NO_INSTALL_FROM_API=1 \ brew install mas \ - --build-from-source \ - --verbose + --build-from-source \ + --verbose # Audit formula brew audit --strict mas @@ -202,4 +202,3 @@ $echo gh pr create \ --base main \ --draft \ --fill - diff --git a/script/brew_tap_update b/script/brew_tap_update index 6af1350..4f6f07a 100755 --- a/script/brew_tap_update +++ b/script/brew_tap_update @@ -116,4 +116,3 @@ $echo gh pr create \ --fill popd - diff --git a/script/format b/script/format index fbf97ca..f1f6265 100755 --- a/script/format +++ b/script/format @@ -35,4 +35,9 @@ echo "--> 🖊 YAML" prettier --write $(yamllint --list-files .) echo "--> 📜 Bash" -shfmt -i 2 -l -w contrib/ script/ +shfmt \ + --write \ + --list \ + --indent 2 \ + --case-indent \ + contrib/ script/ diff --git a/script/lint b/script/lint index e6f9795..c95292d 100755 --- a/script/lint +++ b/script/lint @@ -38,4 +38,9 @@ yamllint . echo "--> 📜 Bash" shellcheck --shell=bash script/* -shfmt -d -i 2 -l contrib/ script/ +shfmt \ + --diff \ + --list \ + --indent 2 \ + --case-indent \ + contrib/ script/ diff --git a/script/version_bump b/script/version_bump index 4ea2a52..83ad244 100755 --- a/script/version_bump +++ b/script/version_bump @@ -51,7 +51,6 @@ cat "${PACKAGE_MANIFEST}" # Write new version into brew formulae for file in ${LOCAL_MAS_FORMULA_PATH} ${LOCAL_TAP_FORMULA_PATH}; do echo "${file}" - sd '( +tag: +)"[^"]+"' "\$1\"${MAS_VERSION}\"" "${file}" - sd '( +revision: +)"[^"]+"' "\$1\"${REVISION}\"" "${file}" + sd '( +tag: +)"[^"]+"' "\$1\"${MAS_VERSION}\"" "${file}" + sd '( +revision: +)"[^"]+"' "\$1\"${REVISION}\"" "${file}" done -