From 9e7909b62e42c854daa061a48909b569e72f23bb Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Wed, 14 Jan 2015 08:51:16 +0100 Subject: [PATCH] Set up Travis releases. --- .travis.yml | 16 ++++++++++++++++ tools/make-chromium.sh | 7 +++++++ tools/make-firefox.sh | 11 +++++------ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..861c818c8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +env: + matrix: + - BROWSER=chromium EXT=zip + - BROWSER=firefox EXT=xpi +script: ./tools/make-${BROWSER}.sh all +deploy: + provider: releases + api_key: + secure: TODO: your key here! + file: dist/build/uBlock.${BROWSER}.${EXT} + skip_cleanup: true + on: + repo: gorhill/uBlock + tags: true + all_branches: true diff --git a/tools/make-chromium.sh b/tools/make-chromium.sh index d5f1c9594..cd5598e46 100755 --- a/tools/make-chromium.sh +++ b/tools/make-chromium.sh @@ -22,4 +22,11 @@ cp platform/chromium/*.js $DES/js/ cp platform/chromium/manifest.json $DES/ cp LICENSE.txt $DES/ +if [ "$1" = all ]; then + echo "*** uBlock.chromium: Creating package..." + pushd $(dirname $DES/) + zip uBlock.chromium.zip -qr $(basename $DES/)/* + popd +fi + echo "*** uBlock.chromium: Package done." diff --git a/tools/make-firefox.sh b/tools/make-firefox.sh index 52d5c9d0a..eac687092 100755 --- a/tools/make-firefox.sh +++ b/tools/make-firefox.sh @@ -2,10 +2,10 @@ # # This script assumes a linux environment -echo "*** uBlock_xpi: Copying files" +echo "*** uBlock.firefox: Copying files" # use underscore instead of a dot! -DES=dist/build/uBlock_xpi +DES=dist/build/uBlock.firefox rm -r $DES mkdir -p $DES @@ -25,15 +25,14 @@ cp platform/firefox/chrome.manifest $DES/ cp platform/firefox/install.rdf $DES/ cp LICENSE.txt $DES/ -echo "*** uBlock_xpi: Generating meta..." +echo "*** uBlock.firefox: Generating meta..." python tools/make-firefox-meta.py $DES/ - if [ "$1" = all ]; then - echo "*** uBlock_xpi: Creating package..." + echo "*** uBlock.firefox: Creating package..." pushd $DES/ zip ../uBlock.firefox.xpi -qr * popd fi -echo "*** uBlock_xpi: Package done." +echo "*** uBlock.firefox: Package done."