Set up Travis releases.

This commit is contained in:
Florian Walch 2015-01-14 08:51:16 +01:00
parent c9322e4e62
commit 9e7909b62e
3 changed files with 28 additions and 6 deletions

16
.travis.yml Normal file
View File

@ -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

View File

@ -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."

View File

@ -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."