mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
🚨 Format scripts and yaml
This commit is contained in:
parent
87fd066403
commit
34ab84f30e
9 changed files with 37 additions and 35 deletions
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -25,7 +25,6 @@ jobs:
|
||||||
start:
|
start:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Logs event details and sets `DRY_RUN` env var
|
# 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/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
|
# https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=published#release
|
||||||
|
@ -52,7 +51,6 @@ jobs:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
needs: start
|
needs: start
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# A fetch-depth of 0 includes all history and tags for script/version
|
# A fetch-depth of 0 includes all history and tags for script/version
|
||||||
|
@ -84,7 +82,6 @@ jobs:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
needs: start
|
needs: start
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# A fetch-depth of 0 includes all history and tags for script/version
|
# A fetch-depth of 0 includes all history and tags for script/version
|
||||||
|
@ -103,7 +100,6 @@ jobs:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
needs: [start, homebrew-core]
|
needs: [start, homebrew-core]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# A fetch-depth of 0 includes all history and tags for script/version
|
# A fetch-depth of 0 includes all history and tags for script/version
|
||||||
|
|
|
@ -41,7 +41,6 @@ main() {
|
||||||
brew bundle install --verbose
|
brew bundle install --verbose
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -x "$(command -v mise)" ]]; then
|
if [[ ! -x "$(command -v mise)" ]]; then
|
||||||
brew install mise
|
brew install mise
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -46,25 +46,25 @@ echo "CURRENT_OS_VERSION_MAJOR: ${CURRENT_OS_VERSION_MAJOR}"
|
||||||
echo "CURRENT_OS_VERSION_MINOR: ${CURRENT_OS_VERSION_MINOR}"
|
echo "CURRENT_OS_VERSION_MINOR: ${CURRENT_OS_VERSION_MINOR}"
|
||||||
|
|
||||||
case "${CURRENT_OS_VERSION_MAJOR}" in
|
case "${CURRENT_OS_VERSION_MAJOR}" in
|
||||||
14)
|
14)
|
||||||
CURRENT_PLATFORM=sonoma
|
CURRENT_PLATFORM=sonoma
|
||||||
;;
|
;;
|
||||||
13)
|
13)
|
||||||
CURRENT_PLATFORM=ventura
|
CURRENT_PLATFORM=ventura
|
||||||
;;
|
;;
|
||||||
12)
|
12)
|
||||||
CURRENT_PLATFORM=monterey
|
CURRENT_PLATFORM=monterey
|
||||||
;;
|
;;
|
||||||
11)
|
11)
|
||||||
CURRENT_PLATFORM=big_sur
|
CURRENT_PLATFORM=big_sur
|
||||||
;;
|
;;
|
||||||
10)
|
10)
|
||||||
CURRENT_PLATFORM=catalina
|
CURRENT_PLATFORM=catalina
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported macOS version. This script requires Catalina or better."
|
echo "Unsupported macOS version. This script requires Catalina or better."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Prefix platform with architecture
|
# Prefix platform with architecture
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
|
|
||||||
HOMEBREW_NO_INSTALL_FROM_API=1 \
|
HOMEBREW_NO_INSTALL_FROM_API=1 \
|
||||||
brew reinstall \
|
brew reinstall \
|
||||||
--interactive mas
|
--interactive mas
|
||||||
|
|
|
@ -46,7 +46,7 @@ while getopts "d" o; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
# DRY_RUN environment variable
|
# DRY_RUN environment variable
|
||||||
# shellcheck disable=SC2153
|
# shellcheck disable=SC2153
|
||||||
|
@ -128,8 +128,8 @@ cp -v "${LOCAL_MAS_FORMULA_PATH}" "${CORE_MAS_FORMULA_PATH}"
|
||||||
|
|
||||||
HOMEBREW_NO_INSTALL_FROM_API=1 \
|
HOMEBREW_NO_INSTALL_FROM_API=1 \
|
||||||
brew install mas \
|
brew install mas \
|
||||||
--build-from-source \
|
--build-from-source \
|
||||||
--verbose
|
--verbose
|
||||||
|
|
||||||
# Audit formula
|
# Audit formula
|
||||||
brew audit --strict mas
|
brew audit --strict mas
|
||||||
|
@ -202,4 +202,3 @@ $echo gh pr create \
|
||||||
--base main \
|
--base main \
|
||||||
--draft \
|
--draft \
|
||||||
--fill
|
--fill
|
||||||
|
|
||||||
|
|
|
@ -116,4 +116,3 @@ $echo gh pr create \
|
||||||
--fill
|
--fill
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -35,4 +35,9 @@ echo "--> 🖊 YAML"
|
||||||
prettier --write $(yamllint --list-files .)
|
prettier --write $(yamllint --list-files .)
|
||||||
|
|
||||||
echo "--> 📜 Bash"
|
echo "--> 📜 Bash"
|
||||||
shfmt -i 2 -l -w contrib/ script/
|
shfmt \
|
||||||
|
--write \
|
||||||
|
--list \
|
||||||
|
--indent 2 \
|
||||||
|
--case-indent \
|
||||||
|
contrib/ script/
|
||||||
|
|
|
@ -38,4 +38,9 @@ yamllint .
|
||||||
|
|
||||||
echo "--> 📜 Bash"
|
echo "--> 📜 Bash"
|
||||||
shellcheck --shell=bash script/*
|
shellcheck --shell=bash script/*
|
||||||
shfmt -d -i 2 -l contrib/ script/
|
shfmt \
|
||||||
|
--diff \
|
||||||
|
--list \
|
||||||
|
--indent 2 \
|
||||||
|
--case-indent \
|
||||||
|
contrib/ script/
|
||||||
|
|
|
@ -51,7 +51,6 @@ cat "${PACKAGE_MANIFEST}"
|
||||||
# Write new version into brew formulae
|
# Write new version into brew formulae
|
||||||
for file in ${LOCAL_MAS_FORMULA_PATH} ${LOCAL_TAP_FORMULA_PATH}; do
|
for file in ${LOCAL_MAS_FORMULA_PATH} ${LOCAL_TAP_FORMULA_PATH}; do
|
||||||
echo "${file}"
|
echo "${file}"
|
||||||
sd '( +tag: +)"[^"]+"' "\$1\"${MAS_VERSION}\"" "${file}"
|
sd '( +tag: +)"[^"]+"' "\$1\"${MAS_VERSION}\"" "${file}"
|
||||||
sd '( +revision: +)"[^"]+"' "\$1\"${REVISION}\"" "${file}"
|
sd '( +revision: +)"[^"]+"' "\$1\"${REVISION}\"" "${file}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue