Skip to content

Commit

Permalink
Rename: script/install-deps.sh -> script/install-dep.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabobko committed Sep 8, 2024
1 parent bf1118e commit 7e8720f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
path: |
swift-exec-deps/.build
.deps
key: ${{ matrix.os }}-${{ runner.arch }}-${{ hashFiles('script/install-deps.sh', 'swift-exec-deps/Package.swift', 'swift-exec-deps/Package.resolved', 'Gemfile', '.bundle/config') }}
key: ${{ matrix.os }}-${{ runner.arch }}-${{ hashFiles('script/install-dep.sh', 'swift-exec-deps/Package.swift', 'swift-exec-deps/Package.resolved', 'Gemfile', '.bundle/config') }}
- run: brew install bash fish xcbeautify
- run: ./script/install-deps.sh
- run: ./script/install-dep.sh --all
- run: ./build-debug.sh
- run: ./run-tests.sh
# "-" means "Sign to run locally". There is no aerospace-codesign-certificate in GH Actions
Expand Down
2 changes: 1 addition & 1 deletion build-shell-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cd "$(dirname "$0")"
source ./script/setup.sh

./script/install-deps.sh --complgen
./script/install-dep.sh --complgen

rm -rf .shell-completion && mkdir -p \
.shell-completion/zsh \
Expand Down
2 changes: 1 addition & 1 deletion generate-shell-parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cd "$(dirname "$0")"
source ./script/setup.sh

./script/install-deps.sh --antlr
./script/install-dep.sh --antlr
./.deps/python-venv/bin/antlr4 -v 4.13.1 -no-listener -Dlanguage=Swift \
-o ./Sources/ShellParserGenerated \
./grammar/ShellLexer.g4 \
Expand Down
2 changes: 1 addition & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ EOF

if test $generate_xcodeproj = 1; then
export XCODEGEN_AEROSPACE_VERSION=$build_version
./script/install-deps.sh --xcodegen
./script/install-dep.sh --xcodegen
./swift-exec-deps/.build/debug/xcodegen # https://github.com/yonaskolb/XcodeGen
fi
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ swift test
./run-cli.sh -h
./run-cli.sh -v

./script/install-deps.sh --swiftlint
./script/install-dep.sh --swiftlint
./swift-exec-deps/.build/debug/swiftlint lint --quiet

./script/install-deps.sh --swiftformat
./script/install-dep.sh --swiftformat
./swift-exec-deps/.build/debug/swiftformat .

./generate.sh --all
Expand Down
28 changes: 7 additions & 21 deletions script/install-deps.sh → script/install-dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,20 @@
cd "$(dirname "$0")/.."
source ./script/setup.sh

all=1
all=0
antlr=0
complgen=0
swiftlint=0
swiftformat=0
xcodegen=0
while [[ $# -gt 0 ]]; do
case $1 in
--antlr)
antlr=1
all=0
shift ;;
--complgen)
all=0
complgen=1
shift ;;
--swiftlint)
all=0
swiftlint=1
shift ;;
--xcodegen)
all=0
xcodegen=1
shift ;;
--swiftformat)
all=0
swiftformat=1
shift ;;
--antlr) antlr=1; shift ;;
--complgen) complgen=1; shift ;;
--swiftlint) swiftlint=1; shift ;;
--xcodegen) xcodegen=1; shift ;;
--swiftformat) swiftformat=1; shift ;;
--all) all=1; shift ;;
*) echo "Unknown option $1"; exit 1 ;;
esac
done
Expand Down
2 changes: 1 addition & 1 deletion script/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ xcodebuild() {
# Function: createItemModels(for:itemModelSource:)
# Thread: <_NSMainThread: 0x6000037202c0>{number = 1, name = main}
# Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
if cmd-exist xcbeautify; then
if /usr/bin/which xcbeautify &> /dev/null; then
/usr/bin/xcodebuild "$@" 2>&1 | xcbeautify --quiet # Only print tasks that have warnings or errors
else
/usr/bin/xcodebuild "$@" 2>&1
Expand Down

0 comments on commit 7e8720f

Please sign in to comment.