Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .periphery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
retain_public: true
strict: true
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
brew "markdownlint-cli"
brew "shellcheck"
brew "shfmt"
brew "swiftformat"

Expand Down
37 changes: 33 additions & 4 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
"version": "3.3.0",
"bottle": {
Expand Down Expand Up @@ -98,12 +127,12 @@
"revision": "00757e80d6861651d3dc18bbc978edf9a5d0a8a9"
},
"peripheryapp/periphery": {
"revision": "9a2339d2bcd07846d2ca580e88082f97b8a66095"
"revision": "22ad61496f90c8b6e8b2af34f371eab6c1cb1f1a"
}
},
"cask": {
"periphery": {
"version": "2.5.2",
"version": "2.6.0",
"options": {
"full_name": "periphery"
}
Expand All @@ -113,9 +142,9 @@
"system": {
"macos": {
"big_sur": {
"HOMEBREW_VERSION": "3.1.9-121-g654c78c",
"HOMEBREW_VERSION": "3.1.11-14-g76cda75",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "b68a20a099cc511ee6df038b3ef46bd4793b3cf7",
"Homebrew/homebrew-core": "112feba9af1ddb9870c7584f8b1d04d4b62827d8",
"CLT": "12.5.0.22.9",
"Xcode": "12.5",
"macOS": "11.4"
Expand Down
8 changes: 3 additions & 5 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ main() {
rm -f Brewfile.lock.json
brew bundle install --no-upgrade --verbose

if [[ "CI" != "true" ]]; then
# Already installed on GitHub Actions runner.
if ! command -v swiftlint >/dev/null; then
brew install swiftlint
fi
# Already installed on GitHub Actions runner.
if [[ ! -x "$(command -v swiftlint)" ]]; then
brew install swiftlint
fi

# Generate Package.swift
Expand Down
2 changes: 1 addition & 1 deletion script/bottle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ echo "==> 🍼 Bottling mas ${VERSION} for: ${OS_NAMES[*]}"
brew install --build-bottle mas

# 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 ' ' -)

mkdir -p "$BOTTLE_DIR"
Expand Down
12 changes: 6 additions & 6 deletions script/build
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
#

# Build for the host architecture by default.
ARCH=
ARCH=()
if [[ "$1" == '--universal' ]]; then
ARCH='--arch arm64 --arch x86_64'
ARCH=(--arch arm64 --arch x86_64)
fi

# Disable the manifest cache on Xcode 12.5 and later.
CACHE=
CACHE=()
if [[ "$(swift build --help)" =~ manifest-cache ]]; then
CACHE='--manifest-cache none'
CACHE=(--manifest-cache none)
fi

echo "==> 🏗️ Building mas ($(script/version))"
swift build \
--configuration release \
${ARCH} \
"${ARCH[@]}" \
--disable-sandbox \
${CACHE}
"${CACHE[@]}"
3 changes: 2 additions & 1 deletion script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ for SOURCE in Package.swift Sources Tests; do
swift run swift-format lint --recursive ${SOURCE}
swiftlint lint --strict ${SOURCE}
done
periphery scan --retain-public --strict
periphery scan

echo
echo "--> 📜 Bash"
shellcheck --shell=bash script/*
shfmt -d -i 2 -l contrib/ script/
4 changes: 2 additions & 2 deletions script/version
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
VERSION=$(git describe --abbrev=0 --tags)
VERSION=${VERSION#v}

SCRIPT_PATH=$(dirname $(which $0))
SCRIPT_PATH=$(dirname "$(which "$0")")

cat <<EOF >"${SCRIPT_PATH}/../Sources/MasKit/Package.swift"
// Generated by: script/version
Expand All @@ -21,4 +21,4 @@ enum Package {
}
EOF

echo ${VERSION}
echo "${VERSION}"