Skip to content

Commit 035f3f5

Browse files
committed
Fix packaging/publishing scripts
1 parent 17430de commit 035f3f5

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ env:
33
matrix:
44
- BROWSER=chromium EXT=zip
55
- BROWSER=firefox EXT=xpi
6-
script: ./tools/make-${BROWSER}.sh all
6+
script: "./tools/make-${BROWSER}.sh ${TRAVIS_TAG}"
77
deploy:
88
provider: releases
99
prerelease: true
1010
api_key:
1111
secure: eQgPAHH6PKu2dLK+NafxwLl66t0cyW5x5NZFquOwsNMal5nsfof7lyXj2F0Q0vUpGeI21MOipBI8UGv5oXPoiXnr0fhEbEBz65C9vypK61WkDCQVGVeZVNGQwSXUm6gD2EzpPgTCIs52+7dKCDJ3stXzdimOiOTYs4WMNKKarFM=
12-
file: dist/build/uMatrix.${BROWSER}.${EXT}
12+
file: dist/build/uMatrix_${TRAVIS_TAG}.${BROWSER}.${EXT}
1313
skip_cleanup: true
1414
on:
1515
repo: gorhill/uMatrix

tools/make-chromium.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ if [ "$1" = all ]; then
2626
pushd $(dirname $DES/)
2727
zip uMatrix.chromium.zip -qr $(basename $DES/)/*
2828
popd
29+
elif [ -n "$1" ]; then
30+
echo "*** uMatrix.chromium: Creating versioned package..."
31+
pushd $(dirname $DES/) > /dev/null
32+
zip uMatrix_"$1".chromium.zip -qr $(basename $DES/)/*
33+
popd > /dev/null
2934
fi
3035

3136
echo "*** uMatrix(Chromium): Package done."

tools/make-firefox.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
echo "*** uMatrix.firefox: Creating web store package"
66
echo "*** uMatrix.firefox: Copying files"
77

8-
DES=dist/build/uMatrix.firefox
8+
BLDIR=dist/build
9+
DES="$BLDIR"/uMatrix.firefox
910
rm -rf $DES
1011
mkdir -p $DES
1112

@@ -27,6 +28,12 @@ if [ "$1" = all ]; then
2728
pushd $DES > /dev/null
2829
zip ../$(basename $DES).xpi -qr *
2930
popd > /dev/null
31+
elif [ -n "$1" ]; then
32+
echo "*** uMatrix.firefox: Creating versioned package..."
33+
pushd $DES > /dev/null
34+
zip ../$(basename $DES).xpi -qr *
35+
popd > /dev/null
36+
mv "$BLDIR"/uMatrix.firefox.xpi "$BLDIR"/uMatrix_"$1".firefox.xpi
3037
fi
3138

3239
echo "*** uMatrix.firefox: Package done."

0 commit comments

Comments
 (0)