-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildAndDeploy.sh
executable file
·58 lines (41 loc) · 1.09 KB
/
buildAndDeploy.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
SRCS=( dojo dojox dijit util library kk )
SAVE_IFS=$IFS
IFS=" "
SRCSTR="${SRCS[*]}"
IFS=$SAVE_IFS
SRCBAKDIR=dtk
DEPLOYDIR=deploy
DEPLOYDEST=heroku
DEPLOYBRANCH=master
set -x
# prep for build
cd src/
rm css/dojo/nihilo.css css/dojo/dojo.css css/dojo/dnd.css
# build
cd client-js/util/buildscripts/
./build.sh --dojoConfig ../../dojoConfig.js --profile ../../build.profile.js --release
# backup no deployable files to gitignored directory
cd ../../
mv $SRCSTR $SRCBAKDIR
# cleanup - stage 1
find . -type f -name '*.uncompressed.js' -print0 | xargs -0 rm -rdf
find . -type f -name '*.consoleStripped.js' -print0 | xargs -0 rm -rdf
# copy built files to dest
mv ${DEPLOYDIR}/dijit/themes/nihilo/nihilo.css ${DEPLOYDIR}/dojo/resources/dojo.css ${DEPLOYDIR}/dojo/resources/dnd.css ../css/dojo/
mv ${DEPLOYDIR}/* .
# cleanup - stage 2
rm -rf ${DEPLOYDIR}
# deploy
cd src/client-js
#git add -f dojo
#git add -f dojox
#git add -f dijit
#git commit -am "build"
#git push --force -u heroku master
#git reset --hard HEAD~1
# destroy built files
#rm -rf $SRCSTR
# restore backup
#mv ${SRCBCK}/* .
set +x