-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·48 lines (36 loc) · 894 Bytes
/
run.sh
File metadata and controls
executable file
·48 lines (36 loc) · 894 Bytes
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
#!/bin/sh
cli="ionic"
main() {
display_info
if [ -z "$WERCKER_IONIC_PACKAGE_BUILD_PLATFORM" ]; then
fail "ionic-package-build: platform argument cannot be empty"
fi
# Command
cmd="package build"
# Command arguments
args=
# platform
if [ -n "$WERCKER_IONIC_PACKAGE_BUILD_PLATFORM" ]; then
args="$args $WERCKER_IONIC_PACKAGE_BUILD_PLATFORM"
fi
# release
if [ "$WERCKER_IONIC_PACKAGE_BUILD_RELEASE" = "true" ]; then
args="$args --release"
fi
# profile
if [ -n "$WERCKER_IONIC_PACKAGE_BUILD_PROFILE" ]; then
args="$args --profile \"$WERCKER_IONIC_PACKAGE_BUILD_PROFILE\""
fi
# Check if running in debug mode
info "Running ionic command"
if [ "$WERCKER_IONIC_PACKAGE_BUILD_DEBUG" = "true" ]; then
info "$cli $cmd $args"
fi
eval "$cli" "$cmd" "$args"
}
display_info() {
info "Running ionic info:"
"$cli" info
echo ""
}
main;