forked from FieldDB/FieldDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswitch_to_production.sh
executable file
·31 lines (25 loc) · 1.29 KB
/
switch_to_production.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
#!/bin/bash
echo ""
echo ""
echo "Put the Chrome app source into non debug mode to not see the debugging output. This makes the app faster."
sed 's/Utils.debugMode *= *true/Utils.debugMode = false/' public/libs/Utils.js > output
mv output public/libs/Utils.js
echo ""
echo ""
echo "Tell the Chrome app to contact the production webservices."
sed 's/webservicesconfig_[^,]*/webservicesconfig_production"/' public/corpus_dashboard.js > output
mv output public/corpus_dashboard.js
sed 's/webservicesconfig_[^,]*/webservicesconfig_production"/' public/sapir_dashboard.js > output
mv output public/sapir_dashboard.js
sed 's/webservicesconfig_[^,]*/webservicesconfig_production"/' public/user_dashboard.js > output
mv output public/user_dashboard.js
sed 's/webservicesconfig_[^,]*/webservicesconfig_production"/' public/welcome_dashboard.js > output
mv output public/welcome_dashboard.js
echo ""
echo ""
echo "Putting the Chrome app's manifest into the production manifest for release into the Chrome store as the stable (branded) version of the app."
cp public/manifest_production.json public/manifest.json
cp public/icon128_production.png public/icon.png
echo ""
echo ""
echo "Now running in production mode using the production webservices. You can now create your Chrome extension for production deployment."