Skip to content

Commit c4d8d4b

Browse files
committed
avoid running build_npm_ios.sh when --no-engine flag is passed
1 parent b7ae6fe commit c4d8d4b

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

build_all_ios.sh

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#!/bin/bash
22
set -e
33

4+
TARGET_ENGINE=${TARGET_ENGINE:=v8} # default to v8 for compat
5+
6+
# See build_nativescript.sh for all supported flags. This parent script is only
7+
# interested in --no-engine.
8+
for arg in $@; do
9+
case $arg in
10+
--v8) TARGET_ENGINE=v8 ;;
11+
--quickjs) TARGET_ENGINE=quickjs ;;
12+
--jsc) TARGET_ENGINE=jsc ;;
13+
--hermes) TARGET_ENGINE=hermes ;;
14+
--no-engine) TARGET_ENGINE=none ;;
15+
*) ;;
16+
esac
17+
done
18+
419
rm -rf ./dist
520
# don't run if NO_UPDATE_VERSION is set
621
# if [ -z "$NO_UPDATE_VERSION" ]; then
@@ -11,4 +26,14 @@ rm -rf ./dist
1126
./build_nativescript.sh --no-vision $1
1227
./build_tklivesync.sh --no-vision
1328
./prepare_dSYMs.sh
14-
./build_npm_ios.sh
29+
30+
if [[ "$TARGET_ENGINE" == "none" ]]; then
31+
# If you're building *with* --no-engine, you're trying to make an npm release
32+
# of a workspace under ./packages/*, like @nativescript/ios-node-api.
33+
echo "Skipping build_npm_ios.sh due to --no-engine flag."
34+
echo "build_all_ios.sh finished!"
35+
else
36+
# If you're building *without* --no-engine, you're trying to make an npm
37+
# release of the root-level workspace, @nativescript/ios.
38+
./build_npm_ios.sh
39+
fi

build_all_vision.sh

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
11
#!/bin/bash
22
set -e
33

4+
TARGET_ENGINE=${TARGET_ENGINE:=v8} # default to v8 for compat
5+
6+
# See build_nativescript.sh for all supported flags. This parent script is only
7+
# interested in --no-engine.
8+
for arg in $@; do
9+
case $arg in
10+
--v8) TARGET_ENGINE=v8 ;;
11+
--quickjs) TARGET_ENGINE=quickjs ;;
12+
--jsc) TARGET_ENGINE=jsc ;;
13+
--hermes) TARGET_ENGINE=hermes ;;
14+
--no-engine) TARGET_ENGINE=none ;;
15+
*) ;;
16+
esac
17+
done
18+
419
rm -rf ./dist
520
./update_version.sh
621
./build_metadata_generator.sh
7-
./build_nativescript.sh --no-catalyst --no-iphone --no-sim
22+
./build_nativescript.sh --no-catalyst --no-iphone --no-sim $1
823
./build_tklivesync.sh --no-catalyst --no-iphone --no-sim
924
./prepare_dSYMs.sh
10-
./build_npm_vision.sh
25+
26+
if [[ "$TARGET_ENGINE" == "none" ]]; then
27+
# If you're building *with* --no-engine, you're trying to make an npm release
28+
# of a workspace under ./packages/*, like @nativescript/ios-node-api.
29+
echo "Skipping build_npm_vision.sh due to --no-engine flag."
30+
echo "build_all_vision.sh finished!"
31+
else
32+
# If you're building *without* --no-engine, you're trying to make an npm
33+
# release of the root-level workspace, @nativescript/ios.
34+
./build_npm_vision.sh
35+
fi

0 commit comments

Comments
 (0)