From e62f252219d3bb6ad8090581d9f4f704a0cc16b5 Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Thu, 22 Jan 2015 09:54:40 -0200 Subject: [PATCH 1/6] script to auto-update site --- update-site.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 update-site.sh diff --git a/update-site.sh b/update-site.sh new file mode 100755 index 000000000..db2d1c903 --- /dev/null +++ b/update-site.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cd vraptor-site +bundle install +rm -rf output deploy +bundle exec nanoc +grunt +git checkout gh-pages +cd .. +cp -R vraptor-site/deploy/* . +git commit -am 'automatically updating vraptor site' +git checkout master From 0db49757f56e5a34258ecc8adb3707503582fc4b Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Tue, 27 Jan 2015 15:33:22 -0200 Subject: [PATCH 2/6] using rvm to load ruby env in update site script --- update-site.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/update-site.sh b/update-site.sh index db2d1c903..0f1e0c732 100755 --- a/update-site.sh +++ b/update-site.sh @@ -1,5 +1,6 @@ #!/bin/bash +rvm use --create 2.0.0@vraptor-site cd vraptor-site bundle install rm -rf output deploy From 7d3b0cb010d54dfb907ab1b0657f490108b0bdcf Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Tue, 27 Jan 2015 16:18:22 -0200 Subject: [PATCH 3/6] rebasing after updating --- update-site.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update-site.sh b/update-site.sh index 0f1e0c732..90bd58217 100755 --- a/update-site.sh +++ b/update-site.sh @@ -6,8 +6,9 @@ bundle install rm -rf output deploy bundle exec nanoc grunt -git checkout gh-pages cd .. +git checkout gh-pages cp -R vraptor-site/deploy/* . git commit -am 'automatically updating vraptor site' +git pull --rebase git checkout master From e069ed06b3049c2b55997f09971f6190cc83f9cf Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Tue, 27 Jan 2015 16:21:12 -0200 Subject: [PATCH 4/6] halting on error & not going back to master in the end --- update-site.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update-site.sh b/update-site.sh index 90bd58217..40e566eb9 100755 --- a/update-site.sh +++ b/update-site.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e # halt on error + rvm use --create 2.0.0@vraptor-site cd vraptor-site bundle install @@ -10,5 +12,3 @@ cd .. git checkout gh-pages cp -R vraptor-site/deploy/* . git commit -am 'automatically updating vraptor site' -git pull --rebase -git checkout master From 39fe9cea9a6a2c8d0b88bd3bd7033fab34c93968 Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Tue, 27 Jan 2015 16:26:16 -0200 Subject: [PATCH 5/6] forcing rvm loading --- update-site.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update-site.sh b/update-site.sh index 40e566eb9..c41ea5c2a 100755 --- a/update-site.sh +++ b/update-site.sh @@ -1,5 +1,7 @@ #!/bin/bash +source "$HOME/.rvm/scripts/rvm" + set -e # halt on error rvm use --create 2.0.0@vraptor-site From 5b44bd8cf3b345956a2e473e9b4a56756ef35e4f Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Tue, 27 Jan 2015 16:41:41 -0200 Subject: [PATCH 6/6] installing grunt & deps in the script --- update-site.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/update-site.sh b/update-site.sh index c41ea5c2a..8e6e3d2be 100755 --- a/update-site.sh +++ b/update-site.sh @@ -7,6 +7,7 @@ set -e # halt on error rvm use --create 2.0.0@vraptor-site cd vraptor-site bundle install +npm install rm -rf output deploy bundle exec nanoc grunt