mirror of
https://github.com/moparisthebest/mailiverse
synced 2024-11-24 09:32:17 -05:00
changes for moves of gwt stuff
This commit is contained in:
parent
56da6feef2
commit
68f2b692ae
3
build/.gitignore
vendored
3
build/.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
www-dev/
|
www/
|
||||||
www-prod/
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then echo "Must supply prod or dev"; exit 0; fi
|
||||||
|
|
||||||
V=`date "+%Y%m%d_%H%M%S"`
|
V=`date "+%Y%m%d_%H%M%S"`
|
||||||
|
M=$1
|
||||||
|
|
||||||
rsync -avL --delete ../web/WebContent/ www-prod/
|
rsync -avL --delete ../web/WebContent/ www/
|
||||||
rsync -avL --delete ../gwt/war/mailiverse_gwt www-prod/mailiverse_gwt
|
rsync -avL --delete ../gwt/war/mailiverse_gwt www/mailiverse_gwt
|
||||||
|
|
||||||
./compile-web-html $V prod
|
./compile-web-html $V $M
|
||||||
./compile-web-js $V prod
|
./compile-web-js $V $M
|
||||||
|
|
||||||
|
@ -5,13 +5,8 @@ V=$1
|
|||||||
M=$2
|
M=$2
|
||||||
|
|
||||||
APP_TITLE=`cat ../deploy/config/title`
|
APP_TITLE=`cat ../deploy/config/title`
|
||||||
HOST_PRIMARY=`cat ../deploy/config/hosts/$M`
|
|
||||||
HOST_AUTH=`cat ../deploy/config/hosts/auth_$M`
|
|
||||||
HOST_TOMCAT=`cat ../deploy/config/hosts/tomcat_$M`
|
|
||||||
HOST_WEB=`cat ../deploy/config/hosts/web_$M`
|
|
||||||
|
|
||||||
|
dst=www
|
||||||
dst=www-$2
|
|
||||||
cmn_src=../web/common
|
cmn_src=../web/common
|
||||||
client_src=../web/client
|
client_src=../web/client
|
||||||
signup_src=../web/signup
|
signup_src=../web/signup
|
||||||
@ -29,10 +24,6 @@ function replaceStrings() {
|
|||||||
sed -i '' -e s/__THIS_YEAR__/2013/g $1
|
sed -i '' -e s/__THIS_YEAR__/2013/g $1
|
||||||
|
|
||||||
sed -i '' -e s/{##TITLE##}/$APP_TITLE/g $1
|
sed -i '' -e s/{##TITLE##}/$APP_TITLE/g $1
|
||||||
sed -i '' -e s/{##HOST_PRIMARY##}/$HOST_PRIMARY/g $1
|
|
||||||
sed -i '' -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1
|
|
||||||
sed -i '' -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1
|
|
||||||
sed -i '' -e s/{##HOST_WEB##}/$HOST_WEB/g $1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo Compiling CSS/JS
|
echo Compiling CSS/JS
|
||||||
|
@ -2,12 +2,22 @@
|
|||||||
|
|
||||||
V=$1
|
V=$1
|
||||||
M=$2
|
M=$2
|
||||||
dst=www-$M
|
dst=www
|
||||||
|
|
||||||
|
HOST_PRIMARY=`cat ../deploy/config/hosts/$M`
|
||||||
|
HOST_AUTH=`cat ../deploy/config/hosts/auth_$M`
|
||||||
|
HOST_TOMCAT=`cat ../deploy/config/hosts/tomcat_$M`
|
||||||
|
HOST_WEB=`cat ../deploy/config/hosts/web_$M`
|
||||||
|
|
||||||
function replaceStrings() {
|
function replaceStrings() {
|
||||||
sed -i '' -f replace_js_$M.sed $1
|
sed -i '' -f replace_js_$M.sed $1
|
||||||
sed -i '' -e s/__VERSION__/$V/g $1
|
sed -i '' -e s/__VERSION__/$V/g $1
|
||||||
sed -i '' -e s/__THIS_YEAR__/2013/g $1
|
sed -i '' -e s/__THIS_YEAR__/2013/g $1
|
||||||
|
|
||||||
|
sed -i '' -e s/{##HOST_PRIMARY##}/$HOST_PRIMARY/g $1
|
||||||
|
sed -i '' -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1
|
||||||
|
sed -i '' -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1
|
||||||
|
sed -i '' -e s/{##HOST_WEB##}/$HOST_WEB/g $1
|
||||||
}
|
}
|
||||||
|
|
||||||
echo Replacing Strings
|
echo Replacing Strings
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
V=`date "+%Y%m%d_%H%M%S"`
|
V=`date "+%Y%m%d_%H%M%S"`
|
||||||
|
|
||||||
rsync -avL --exclude="WEB-INF" --delete ../gwt/war/ www-dev/
|
rsync -avL --delete ../web/WebContent/ www-dev/
|
||||||
|
rsync -avL --delete ../gwt/war/mailiverse_gwt www-dev/mailiverse_gwt
|
||||||
|
|
||||||
./compile-web-html $V dev
|
./compile-web-html $V dev
|
||||||
./compile-web-js $V dev
|
./compile-web-js $V dev
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
./web-deploy
|
./web-deploy
|
||||||
s3cmd sync www/ s3://www.mailiverse.com/beta/ --acl-public --delete-removed
|
s3cmd sync ../build/www-dev/ s3://www.mailiverse.com/beta/ --acl-public --delete-removed
|
||||||
|
|
||||||
echo putting files with cache control headers
|
echo putting files with cache control headers
|
||||||
s3cmd put www/index.html s3://www.mailiverse.com/beta/ --acl-public --add-header "Cache-Control: max-age:3600"
|
s3cmd put ../build/www-dev/index.html s3://www.mailiverse.com/beta/ --acl-public --add-header "Cache-Control: max-age:3600"
|
||||||
s3cmd put www/mailiverse_gwt/mailiverse_gwt.nocache.js s3://www.mailiverse.com/beta/mailiverse_gwt/ --acl-public --add-header "Cache-Control: no-cache"
|
s3cmd put ../build/www-dev/mailiverse_gwt/mailiverse_gwt.nocache.js s3://www.mailiverse.com/beta/mailiverse_gwt/ --acl-public --add-header "Cache-Control: no-cache"
|
||||||
echo done
|
echo done
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
./web-deploy
|
./web-deploy
|
||||||
s3cmd sync www/ s3://www.mailiverse.com/ --acl-public --delete-removed
|
s3cmd sync ../build/www-prod/ s3://www.mailiverse.com/ --acl-public --delete-removed
|
||||||
|
|
||||||
echo putting files with cache control headers
|
echo putting files with cache control headers
|
||||||
s3cmd put www/*.html s3://www.mailiverse.com/ --acl-public --add-header "Cache-Control: max-age:3600"
|
s3cmd put ../build/www-prod/*.html s3://www.mailiverse.com/ --acl-public --add-header "Cache-Control: max-age:3600"
|
||||||
s3cmd put www/*.txt s3://www.mailiverse.com/ --acl-public --add-header "Cache-Control: max-age:3600"
|
s3cmd put ../build/www-prod/*.txt s3://www.mailiverse.com/ --acl-public --add-header "Cache-Control: max-age:3600"
|
||||||
s3cmd put www/mailiverse_gwt/mailiverse_gwt.nocache.js s3://www.mailiverse.com/mailiverse_gwt/ --acl-public --add-header "Cache-Control: no-cache"
|
s3cmd put ../build/www-prod/mailiverse_gwt/mailiverse_gwt.nocache.js s3://www.mailiverse.com/mailiverse_gwt/ --acl-public --add-header "Cache-Control: no-cache"
|
||||||
echo done
|
echo done
|
||||||
|
@ -1 +1 @@
|
|||||||
../www
|
../../build/www
|
Loading…
Reference in New Issue
Block a user