🧹 Restore shellcheck (0.7.2)

This commit is contained in:
Chris Araman 2021-06-08 18:56:27 -07:00 committed by Chris Araman
parent d7dfe378f2
commit 726b1868f2
7 changed files with 47 additions and 18 deletions

View file

@ -1,4 +1,5 @@
brew "markdownlint-cli" brew "markdownlint-cli"
brew "shellcheck"
brew "shfmt" brew "shfmt"
brew "swiftformat" brew "swiftformat"

View file

@ -30,6 +30,35 @@
} }
} }
}, },
"shellcheck": {
"version": "0.7.2",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/shellcheck/blobs/sha256:8844cd2a84bd07f8697463d9af3cc41cc4356edfa11d1171255884dc732ee9cd",
"sha256": "8844cd2a84bd07f8697463d9af3cc41cc4356edfa11d1171255884dc732ee9cd"
},
"big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/shellcheck/blobs/sha256:516df7bcc8d5b1e7e4b989b472e89d9e3cf5e4dfc977aa45f06c0335c697b77a",
"sha256": "516df7bcc8d5b1e7e4b989b472e89d9e3cf5e4dfc977aa45f06c0335c697b77a"
},
"catalina": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/shellcheck/blobs/sha256:d4ffbfe9cb1fc1c888c7b6805a6c224810e4137c0bac0aac3041733bb36b7d79",
"sha256": "d4ffbfe9cb1fc1c888c7b6805a6c224810e4137c0bac0aac3041733bb36b7d79"
},
"mojave": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/shellcheck/blobs/sha256:a810166fde56298431a942ec439d5359e871a0727b989788040608876b519b07",
"sha256": "a810166fde56298431a942ec439d5359e871a0727b989788040608876b519b07"
}
}
}
},
"shfmt": { "shfmt": {
"version": "3.3.0", "version": "3.3.0",
"bottle": { "bottle": {
@ -98,12 +127,12 @@
"revision": "00757e80d6861651d3dc18bbc978edf9a5d0a8a9" "revision": "00757e80d6861651d3dc18bbc978edf9a5d0a8a9"
}, },
"peripheryapp/periphery": { "peripheryapp/periphery": {
"revision": "9a2339d2bcd07846d2ca580e88082f97b8a66095" "revision": "22ad61496f90c8b6e8b2af34f371eab6c1cb1f1a"
} }
}, },
"cask": { "cask": {
"periphery": { "periphery": {
"version": "2.5.2", "version": "2.6.0",
"options": { "options": {
"full_name": "periphery" "full_name": "periphery"
} }
@ -113,9 +142,9 @@
"system": { "system": {
"macos": { "macos": {
"big_sur": { "big_sur": {
"HOMEBREW_VERSION": "3.1.9-121-g654c78c", "HOMEBREW_VERSION": "3.1.11-14-g76cda75",
"HOMEBREW_PREFIX": "/opt/homebrew", "HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "b68a20a099cc511ee6df038b3ef46bd4793b3cf7", "Homebrew/homebrew-core": "112feba9af1ddb9870c7584f8b1d04d4b62827d8",
"CLT": "12.5.0.22.9", "CLT": "12.5.0.22.9",
"Xcode": "12.5", "Xcode": "12.5",
"macOS": "11.4" "macOS": "11.4"

View file

@ -18,11 +18,9 @@ main() {
rm -f Brewfile.lock.json rm -f Brewfile.lock.json
brew bundle install --no-upgrade --verbose brew bundle install --no-upgrade --verbose
if [[ "CI" != "true" ]]; then # Already installed on GitHub Actions runner.
# Already installed on GitHub Actions runner. if [[ ! -x "$(command -v swiftlint)" ]]; then
if ! command -v swiftlint >/dev/null; then brew install swiftlint
brew install swiftlint
fi
fi fi
# Generate Package.swift # Generate Package.swift

View file

@ -74,7 +74,7 @@ echo "==> 🍼 Bottling mas ${VERSION} for: ${OS_NAMES[*]}"
brew install --build-bottle mas brew install --build-bottle mas
# Generate bottle do block, dropping last 2 lines # Generate bottle do block, dropping last 2 lines
brew bottle --verbose --no-rebuild --root-url=$ROOT_URL mas brew bottle --verbose --no-rebuild --root-url="$ROOT_URL" mas
SHA256=$(shasum --algorithm 256 "${OLD_FILENAME}" | cut -f 1 -d ' ' -) SHA256=$(shasum --algorithm 256 "${OLD_FILENAME}" | cut -f 1 -d ' ' -)
mkdir -p "$BOTTLE_DIR" mkdir -p "$BOTTLE_DIR"

View file

@ -7,20 +7,20 @@
# #
# Build for the host architecture by default. # Build for the host architecture by default.
ARCH= ARCH=()
if [[ "$1" == '--universal' ]]; then if [[ "$1" == '--universal' ]]; then
ARCH='--arch arm64 --arch x86_64' ARCH=(--arch arm64 --arch x86_64)
fi fi
# Disable the manifest cache on Xcode 12.5 and later. # Disable the manifest cache on Xcode 12.5 and later.
CACHE= CACHE=()
if [[ "$(swift build --help)" =~ manifest-cache ]]; then if [[ "$(swift build --help)" =~ manifest-cache ]]; then
CACHE='--manifest-cache none' CACHE=(--manifest-cache none)
fi fi
echo "==> 🏗️ Building mas ($(script/version))" echo "==> 🏗️ Building mas ($(script/version))"
swift build \ swift build \
--configuration release \ --configuration release \
${ARCH} \ "${ARCH[@]}" \
--disable-sandbox \ --disable-sandbox \
${CACHE} "${CACHE[@]}"

View file

@ -37,4 +37,5 @@ periphery scan --retain-public --strict
echo echo
echo "--> 📜 Bash" echo "--> 📜 Bash"
shellcheck --shell=bash script/*
shfmt -d -i 2 -l contrib/ script/ shfmt -d -i 2 -l contrib/ script/

View file

@ -12,7 +12,7 @@
VERSION=$(git describe --abbrev=0 --tags) VERSION=$(git describe --abbrev=0 --tags)
VERSION=${VERSION#v} VERSION=${VERSION#v}
SCRIPT_PATH=$(dirname $(which $0)) SCRIPT_PATH=$(dirname "$(which "$0")")
cat <<EOF >"${SCRIPT_PATH}/../Sources/MasKit/Package.swift" cat <<EOF >"${SCRIPT_PATH}/../Sources/MasKit/Package.swift"
// Generated by: script/version // Generated by: script/version
@ -21,4 +21,4 @@ enum Package {
} }
EOF EOF
echo ${VERSION} echo "${VERSION}"