🚨 Format scripts and yaml

This commit is contained in:
Ben Chatelain 2024-03-31 11:05:04 -06:00
parent 87fd066403
commit 34ab84f30e
No known key found for this signature in database
9 changed files with 37 additions and 35 deletions

View file

@ -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

View file

@ -41,7 +41,6 @@ main() {
brew bundle install --verbose
fi
if [[ ! -x "$(command -v mise)" ]]; then
brew install mise
fi

View file

@ -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

View file

@ -8,4 +8,4 @@
HOMEBREW_NO_INSTALL_FROM_API=1 \
brew reinstall \
--interactive mas
--interactive mas

View file

@ -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

View file

@ -116,4 +116,3 @@ $echo gh pr create \
--fill
popd

View file

@ -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/

View file

@ -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/

View file

@ -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