forked from merative/spm-ui-upgrade-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.sh
38 lines (33 loc) · 1.25 KB
/
dev.sh
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
#!/usr/bin/sh
# This is for mapping local development code onto the docker image so you can watch for changes
if [[ "$UIUH_DEV" == "true" ]]; then
UIUH_DEV_CMD="-v $PWD/packages/main-tool:/home/theia/packages/main-tool/ \
-v $PWD/packages/css-rules-tool:/home/theia/packages/css-rules-tool/ \
-v $PWD/packages/icon-replacer-tool:/home/theia/packages/icon-replacer-tool/ \
-v $PWD/packages/js-rules-tool:/home/theia/packages/js-rules-tool/ \
-v $PWD/packages/shared-utils:/home/theia/packages/shared-utils/ \
-v $PWD/packages/window-size-tool:/home/theia/packages/window-size-tool/ \
-v $PWD/config:/home/theia/config/"
echo Dev Mode On
else
UIUH_DEV_CMD=
echo "Dev Mode Off (use export UIUH_DEV=true to turn it on)"
fi
if [[ -z "$VERSION" ]]; then
VERSION=latest
fi
if [[ -z "$INPUT_FOLDER" ]]; then
INPUT_FOLDER=$PWD/workspace/input
fi
if [[ -z "$OUTPUT_FOLDER" ]]; then
OUTPUT_FOLDER=$PWD/workspace/output
fi
echo Starting spm-ui-upgrade-helper
echo
echo VERSION = $VERSION
echo INPUT_FOLDER = $INPUT_FOLDER
echo OUTPUT_FOLDER = $OUTPUT_FOLDER
echo
docker-compose rm -f -s -v
docker-compose run -p 3000:3000 -p 4000-4004:4000-4004 $UIUH_DEV_CMD --name spm-ui-upgrade-helper spm-ui-upgrade-helper
echo Docker run