From 847398d7bf15a5f90e181d99000eb6600fe2033a Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 18 May 2016 02:03:57 +0200 Subject: [PATCH] Travis deployment scripts. --- .npmignore | 4 +++- .travis.yml | 17 +++++++++++++++++ ci/deploy_from_travis.sh | 25 +++++++++++++++++++++++++ ci/deploy_key.enc | Bin 0 -> 1680 bytes 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100755 ci/deploy_from_travis.sh create mode 100644 ci/deploy_key.enc diff --git a/.npmignore b/.npmignore index 934a59996b..2d26274b47 100644 --- a/.npmignore +++ b/.npmignore @@ -2,4 +2,6 @@ assets index.html soljson.js bin/list.* -bin/soljson-v* \ No newline at end of file +bin/soljson-v* +.travis.yml +deployment/* diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..ceda478abd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: node_js +node_js: +- stable +deploy: + provider: script + script: ci/deploy_from_travis.sh + skip_cleanup: true + on: + branch: master +env: + global: + - ENCRYPTION_LABEL: "b5c2730599da" + - COMMIT_AUTHOR_EMAIL: "chris@ethereum.org" + - COMMIT_AUTHOR: "Travis CI" + - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json worker.js" + + diff --git a/ci/deploy_from_travis.sh b/ci/deploy_from_travis.sh new file mode 100755 index 0000000000..b2f3c0643b --- /dev/null +++ b/ci/deploy_from_travis.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +REPO=`git config remote.origin.url` +SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} +SHA=`git rev-parse --verify HEAD` + +git config user.name "$COMMIT_AUTHOR" +git config user.email "$COMMIT_AUTHOR_EMAIL" +git checkout --orphan gh-pages +git rm --cached -r . +git add $FILES_TO_PACKAGE +git commit -m "Built website from {$SHA}." + +ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" +ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" +ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} +ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} +openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ci/deploy_key.enc -out deploy_key -d +chmod 600 deploy_key +eval `ssh-agent -s` +ssh-add deploy_key + +git push -f "${SSH_REPO}" gh-pages diff --git a/ci/deploy_key.enc b/ci/deploy_key.enc new file mode 100644 index 0000000000000000000000000000000000000000..26e01a37aab2464584b665027ee656f6784af167 GIT binary patch literal 1680 zcmV;B25db-8i|iNWpy$yK@9sCXC4O^doVOwp=E*7BL?5E@?~Fmm5@9Z=!!5d{^_ zN@EB$(S-v60fryqD)6I{vsab#;j*d^al-kRWieIKGx$pIy8Pm&E>k_7B?VdZ%db4L z#RyDTN~O2x9pw<=;kSrj?45o~2R@pJx)xO+u=plOHXd8R3H$K=oLsQ zBL!Gt#_^s;;Qy1*UGi8)CFkg^BmEmX#!Dab6Y{QMi&0)lny+<3wIDnLK^;j~bBHd_ESaX~<%s_eOsq7S=qtk-s)*qE*OmTp)1!Z5(~Vt!|)c zBWA<~@5D;?V}U~25d_jwlmv#2QnAO2Ik&f`4$8$s4LT2$VUy8&FR598GCQM-PTf@z zFL|%h0eb!gf3UWh!y;e8d652=S=EUIzemdI?A6YXlbj2lU>jqA9kMl}W(r#nv|^<< zGq!^@^e!<{%7wd>unV-CmsorKZf-DLl()#3SZZdHYE5vjH`6Zri^uLug0s#uSM}P zC_Pw)FM`Z-5X}oL;$i0I=y{&+sNdYKiv7=cO@HXm;bf45xU} ztoIECMu9iW92H1GJ)fs5i8_dCAzcrUHujvK_>dA4BxgIfAS2au;-8rJc5IAm*PDm7 zrTyTwfC?bF7d!WrKGwL#HBGx>4%&I-uhAYkA%a*jg;*cfXx)+i9B(z(^k>odL!dtqAZMPe>#3wWxYGkd0j7=XSm4}d$gniBhs6y;vT@D zxxcQsA$vg$zVCSW2KZ=w<(C7EE7QlB+H0RLwB+7ut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