From 175182913fd3994999ea6bff1bb3c9c9e098fab2 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 12 Jul 2016 02:17:33 +0100 Subject: [PATCH 1/3] Create zip file during Travis deployment --- .travis.yml | 2 +- ci/deploy_from_travis.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2be23f4d9e..8fd4bdef68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ env: - COMMIT_AUTHOR_EMAIL="chris@ethereum.org" - COMMIT_AUTHOR="Travis CI" - PUSH_REPO="git@github.com:ethereum/browser-solidity.git" - - FILES_TO_PACKAGE="assets background.js build icon.png index.html manifest.json README.md" + - FILES_TO_PACKAGE="assets background.js build icon.png index.html manifest.json README.md browser-solidity-*.zip" cache: directories: - node_modules diff --git a/ci/deploy_from_travis.sh b/ci/deploy_from_travis.sh index 27f888768a..5fe871aa2f 100755 --- a/ci/deploy_from_travis.sh +++ b/ci/deploy_from_travis.sh @@ -10,6 +10,9 @@ git checkout --orphan gh-pages git rm --cached -r . echo "# Automatic build" > README.md echo "Built website from {$SHA}. See https://github.com/ethereum/browser-solidity/ for details." >> README.md +echo "To use an offline copy, download browser-solidity-$SHA.zip." >> README.md +# ZIP the whole directory +zip -r browser-solidity-$SHA.zip . # -f is needed because "build" is part of .gitignore git add -f $FILES_TO_PACKAGE git commit -m "Built website from {$SHA}." From c6fa3cb0befd2c3da5fda4777a68a4d7cc1f247f Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 14 Jul 2016 16:36:34 +0100 Subject: [PATCH 2/3] Only include the required files in the ZIP --- ci/deploy_from_travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deploy_from_travis.sh b/ci/deploy_from_travis.sh index 5fe871aa2f..f996ea33b8 100755 --- a/ci/deploy_from_travis.sh +++ b/ci/deploy_from_travis.sh @@ -12,7 +12,7 @@ echo "# Automatic build" > README.md echo "Built website from {$SHA}. See https://github.com/ethereum/browser-solidity/ for details." >> README.md echo "To use an offline copy, download browser-solidity-$SHA.zip." >> README.md # ZIP the whole directory -zip -r browser-solidity-$SHA.zip . +zip -r browser-solidity-$SHA.zip $FILES_TO_PACKAGE # -f is needed because "build" is part of .gitignore git add -f $FILES_TO_PACKAGE git commit -m "Built website from {$SHA}." From 2d61b9c01b4dba4b562b3d4ea9f6825ac9db7214 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 14 Jul 2016 16:48:05 +0100 Subject: [PATCH 3/3] Do not package browser-solidity-*.zip recursively --- .travis.yml | 2 +- ci/deploy_from_travis.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8fd4bdef68..2be23f4d9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ env: - COMMIT_AUTHOR_EMAIL="chris@ethereum.org" - COMMIT_AUTHOR="Travis CI" - PUSH_REPO="git@github.com:ethereum/browser-solidity.git" - - FILES_TO_PACKAGE="assets background.js build icon.png index.html manifest.json README.md browser-solidity-*.zip" + - FILES_TO_PACKAGE="assets background.js build icon.png index.html manifest.json README.md" cache: directories: - node_modules diff --git a/ci/deploy_from_travis.sh b/ci/deploy_from_travis.sh index f996ea33b8..f6ae070502 100755 --- a/ci/deploy_from_travis.sh +++ b/ci/deploy_from_travis.sh @@ -14,7 +14,7 @@ echo "To use an offline copy, download browser-solidity-$SHA.zip." >> README.md # ZIP the whole directory zip -r browser-solidity-$SHA.zip $FILES_TO_PACKAGE # -f is needed because "build" is part of .gitignore -git add -f $FILES_TO_PACKAGE +git add -f $FILES_TO_PACKAGE browser-solidity-$SHA.zip git commit -m "Built website from {$SHA}." ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"