-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_all_node_api.sh
More file actions
executable file
·60 lines (48 loc) · 1.59 KB
/
build_all_node_api.sh
File metadata and controls
executable file
·60 lines (48 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -e
source "$(dirname "$0")/build_utils.sh"
TARGET_ENGINE=${TARGET_ENGINE:=some}
BUILD_IPHONE=$(to_bool ${BUILD_IPHONE:=true})
BUILD_SIMULATOR=$(to_bool ${BUILD_SIMULATOR:=true})
BUILD_MACOS=$(to_bool ${BUILD_MACOS:=false})
EMBED_METADATA=$(to_bool ${EMBED_METADATA:=false})
# See build_nativescript.sh for all supported flags. This parent script is only
# interested in intercepting a subset of them.
for arg in $@; do
case $arg in
--v8|--quickjs|--jsc|--hermes) TARGET_ENGINE=some ;;
--sim|--simulator) BUILD_SIMULATOR=true ;;
--no-sim|--no-simulator) BUILD_SIMULATOR=false ;;
--iphone|--device) BUILD_IPHONE=true ;;
--no-iphone|--no-device) BUILD_IPHONE=false ;;
--macos) BUILD_MACOS=true ;;
--no-macos) BUILD_MACOS=false ;;
--no-engine) TARGET_ENGINE=none ;;
--embed-metadata) EMBED_METADATA=true ;;
*) ;;
esac
done
rm -rf ./dist
# don't run if NO_UPDATE_VERSION is set
if [ -z "$NO_UPDATE_VERSION" ]; then
# TODO: integrate version into runtime
./update_version.sh
fi
./build_metadata_generator.sh
checkpoint "Generating metadata, as --embed-metadata was passed..."
if $BUILD_IPHONE; then
checkpoint "Generating metadata for iOS (physical device)..."
npm run metagen ios
fi
if $BUILD_SIMULATOR; then
checkpoint "Generating metadata for iOS (simulator)..."
npm run metagen ios-sim
fi
if $BUILD_MACOS; then
checkpoint "Generating metadata for macOS..."
npm run metagen macos
fi
checkpoint "... All metadata generated!"
./build_nativescript.sh --no-vision --no-engine $1 $2 $3 $4 $5 $6 $7 $8 $9
./prepare_dSYMs.sh
./build_npm_node_api.sh