From ecf0b9753693b06ab198030eda305a992bc9f1b9 Mon Sep 17 00:00:00 2001 From: Eddie Monge Date: Wed, 16 Nov 2011 17:04:22 -0800 Subject: [PATCH 1/2] Update the deployed files to use the CDN for the resources --- .gitignore | 1 + Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e2dec53713e..a9d51d12b71 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ cache/ combined/ combine/ compiled/ +tmp/ *.swp .gitignore tests/speed/stats/stats.db diff --git a/Makefile b/Makefile index 7c78838d6e8..b1b7febc57c 100644 --- a/Makefile +++ b/Makefile @@ -194,7 +194,12 @@ deploy: init js css docs zip @@rm -rf tmp/${VER_OFFICIAL} # Create the Demos/Docs/Tests/Tools for jQueryMobile.com @@mv ${OUTPUT}/demos tmp/${VER_OFFICIAL} - # ... And copied to the CDN and the jquerymobile.com server + # ... By first replacing the paths + @@find tmp/${VER_OFFICIAL} -type f \ + \( -name '*.html' -o -name '*.php' \) \ + -exec perl -pi -e \ + 's|src="(.*)/${NAME}.min.js"|src="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.js"|g;s|href="(.*)/${NAME}.min.css"|href="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.css"|g;s|src="(.*)/jquery.js"|src="//code.jquery.com/jquery-1.6.4.js"|g' {} \; + # ... So they can be copied to jquerymobile.com @@scp -r tmp/* jqadmin@jquerymobile.com:/srv/jquerymobile.com/htdocs/demos/ # Do some cleanup to wrap it up @@rm -rf tmp From 4a1f4f8a0211ec3b4a2c965052d19dccdb223360 Mon Sep 17 00:00:00 2001 From: Eddie Monge Date: Wed, 16 Nov 2011 17:35:25 -0800 Subject: [PATCH 2/2] Add quiet option to scp --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b1b7febc57c..ec5ce7fcfd3 100644 --- a/Makefile +++ b/Makefile @@ -169,7 +169,7 @@ zip: init css js # Push the latest git version to the CDN. This is done on a post commit hook latest: init js css zip # Time to put these on the CDN - @@scp -r ${OUTPUT}/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/latest/ + @@scp -qr ${OUTPUT}/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/latest/ # Do some cleanup to wrap it up @@rm -rf ${OUTPUT} # ------------------------------------------------- @@ -179,7 +179,7 @@ nightlies: init js css zip docs # Time to put these on the CDN @@mkdir -p tmp/nightlies @@mv ${OUTPUT} tmp/nightlies/$$(date "+%Y%m%d") - @@scp -r tmp/nightlies/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/nightlies/ + @@scp -qr tmp/nightlies/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/nightlies/ # Do some cleanup to wrap it up @@rm -rf tmp # ------------------------------------------------- @@ -190,17 +190,17 @@ deploy: init js css docs zip # Deploying all the files to the CDN @@mkdir tmp @@cp -r ${OUTPUT} tmp/${VER_OFFICIAL} - @@scp -r tmp/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/ + @@scp -qr tmp/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/ @@rm -rf tmp/${VER_OFFICIAL} - # Create the Demos/Docs/Tests/Tools for jQueryMobile.com @@mv ${OUTPUT}/demos tmp/${VER_OFFICIAL} + # Create the Demos/Docs/Tests/Tools for jQueryMobile.com # ... By first replacing the paths @@find tmp/${VER_OFFICIAL} -type f \ \( -name '*.html' -o -name '*.php' \) \ -exec perl -pi -e \ - 's|src="(.*)/${NAME}.min.js"|src="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.js"|g;s|href="(.*)/${NAME}.min.css"|href="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.css"|g;s|src="(.*)/jquery.js"|src="//code.jquery.com/jquery-1.6.4.js"|g' {} \; + 's|src="(.*)${NAME}.min.js"|src="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.js"|g;s|href="(.*)${NAME}.min.css"|href="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.css"|g;s|src="(.*)jquery.js"|src="//code.jquery.com/jquery-1.6.4.js"|g' {} \; # ... So they can be copied to jquerymobile.com - @@scp -r tmp/* jqadmin@jquerymobile.com:/srv/jquerymobile.com/htdocs/demos/ + @@scp -qr tmp/* jqadmin@jquerymobile.com:/srv/jquerymobile.com/htdocs/demos/ # Do some cleanup to wrap it up @@rm -rf tmp @@rm -rf ${OUTPUT}