Skip to content

Commit

Permalink
🚨 Format scripts and yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
phatblat committed Mar 31, 2024
1 parent 87fd066 commit 34ab84f
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 35 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ main() {
brew bundle install --verbose
fi


if [[ ! -x "$(command -v mise)" ]]; then
brew install mise
fi
Expand Down
38 changes: 19 additions & 19 deletions script/bottle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion script/brew_build_interactive
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

HOMEBREW_NO_INSTALL_FROM_API=1 \
brew reinstall \
--interactive mas
--interactive mas
7 changes: 3 additions & 4 deletions script/brew_core_update
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ while getopts "d" o; do
;;
esac
done
shift $((OPTIND-1))
shift $((OPTIND - 1))

# DRY_RUN environment variable
# shellcheck disable=SC2153
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -202,4 +202,3 @@ $echo gh pr create \
--base main \
--draft \
--fill

1 change: 0 additions & 1 deletion script/brew_tap_update
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,3 @@ $echo gh pr create \
--fill

popd

7 changes: 6 additions & 1 deletion script/format
Original file line number Diff line number Diff line change
Expand Up @@ -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/
7 changes: 6 additions & 1 deletion script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -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/
5 changes: 2 additions & 3 deletions script/version_bump
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 34ab84f

Please sign in to comment.