This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
115 lines (115 loc) · 2.32 KB
/
build
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
## Run the bundler
#
#
## Define the environment variables
DEBUG_MODE=0
BUILD=0
BUILD_WEB=0
BUILD_WINDOWS=0
BUILD_MAC=0
BUILD_LINUX=0
BUILD_ANDROID=0
LOCAL=0
#
## Check the command arguments
if [ $# -ne 0 ]; then
#
for argument in "$@"; do
#
if [ "$argument" = "-local" ]; then
#
LOCAL=1
#
elif [ "$argument" = "-web" ]; then
#
BUILD_WEB=1
BUILD=1
#
elif [ "$argument" = "-windows" ]; then
#
BUILD_WINDOWS=1
BUILD=1
#
elif [ "$argument" = "-linux" ]; then
#
BUILD_LINUX=1
BUILD=1
#
elif [ "$argument" = "-mac" ]; then
#
BUILD_MAC=1
BUILD=1
#
elif [ "$argument" = "-android" ]; then
#
BUILD_ANDROID=1
BUILD=1
#
elif [ "$argument" = "-desktop" ]; then
#
BUILD_WINDOWS=1
BUILD_MAC=1
BUILD_LINUX=1
BUILD=1
#
elif [ "$argument" = "-mobile" ]; then
#
BUILD_ANDROID=1
BUILD=1
#
elif [ "$argument" = "-all" ]; then
#
BUILD_WEB=1
BUILD_WINDOWS=1
BUILD_MAC=1
BUILD_LINUX=1
BUILD_ANDROID=1
BUILD=1
#
elif [ "$argument" = "-debug" ]; then
#
DEBUG_MODE=1
#
fi
#
done
#
fi
#
## Print the build settings
###### if [ $DEBUG_MODE -eq 1 ]; then
###### #
###### echo "[DEBUG] Local: $LOCAL"
###### echo "[DEBUG] Web: $BUILD_WEB"
###### echo "[DEBUG] Windows: $BUILD_WINDOWS"
###### echo "[DEBUG] Linux: $BUILD_LINUX"
###### echo "[DEBUG] macOS: $BUILD_MAC"
###### echo "[DEBUG] Android: $BUILD_ANDROID"
###### #
###### fi
#
## Disable macOS builds for now
if [ $BUILD_MAC -eq 1 ]; then
#
echo -e "\n[Bundler] macOS builds are disabled!"
BUILD_MAC=0
if [ $(expr $BUILD_WEB + $BUILD_WINDOWS + $BUILD_LINUX + $BUILD_MAC + $BUILD_ANDROID) -gt 0 ]; then
#
BUILD=1
#
else
#
BUILD=0
#
fi
#
fi
#
## Run the `start.sh` file
if [ $BUILD -eq 1 ]; then
#
cd "bundler/"
"./start.sh" $DEBUG_MODE $BUILD_WEB $BUILD_WINDOWS $BUILD_LINUX $BUILD_MAC $BUILD_ANDROID $LOCAL
#
fi
#