From 035f3f53a2c4daabf7a5475c321fb8595df1cf0e Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 25 Dec 2019 09:30:34 -0500 Subject: [PATCH] Fix packaging/publishing scripts --- .travis.yml | 4 ++-- tools/make-chromium.sh | 5 +++++ tools/make-firefox.sh | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2545f23..9aba294 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,13 +3,13 @@ env: matrix: - BROWSER=chromium EXT=zip - BROWSER=firefox EXT=xpi -script: ./tools/make-${BROWSER}.sh all +script: "./tools/make-${BROWSER}.sh ${TRAVIS_TAG}" deploy: provider: releases prerelease: true api_key: secure: eQgPAHH6PKu2dLK+NafxwLl66t0cyW5x5NZFquOwsNMal5nsfof7lyXj2F0Q0vUpGeI21MOipBI8UGv5oXPoiXnr0fhEbEBz65C9vypK61WkDCQVGVeZVNGQwSXUm6gD2EzpPgTCIs52+7dKCDJ3stXzdimOiOTYs4WMNKKarFM= - file: dist/build/uMatrix.${BROWSER}.${EXT} + file: dist/build/uMatrix_${TRAVIS_TAG}.${BROWSER}.${EXT} skip_cleanup: true on: repo: gorhill/uMatrix diff --git a/tools/make-chromium.sh b/tools/make-chromium.sh index 27855e8..e43a2fd 100755 --- a/tools/make-chromium.sh +++ b/tools/make-chromium.sh @@ -26,6 +26,11 @@ if [ "$1" = all ]; then pushd $(dirname $DES/) zip uMatrix.chromium.zip -qr $(basename $DES/)/* popd +elif [ -n "$1" ]; then + echo "*** uMatrix.chromium: Creating versioned package..." + pushd $(dirname $DES/) > /dev/null + zip uMatrix_"$1".chromium.zip -qr $(basename $DES/)/* + popd > /dev/null fi echo "*** uMatrix(Chromium): Package done." diff --git a/tools/make-firefox.sh b/tools/make-firefox.sh index 618dd3b..47d6797 100755 --- a/tools/make-firefox.sh +++ b/tools/make-firefox.sh @@ -5,7 +5,8 @@ echo "*** uMatrix.firefox: Creating web store package" echo "*** uMatrix.firefox: Copying files" -DES=dist/build/uMatrix.firefox +BLDIR=dist/build +DES="$BLDIR"/uMatrix.firefox rm -rf $DES mkdir -p $DES @@ -27,6 +28,12 @@ if [ "$1" = all ]; then pushd $DES > /dev/null zip ../$(basename $DES).xpi -qr * popd > /dev/null +elif [ -n "$1" ]; then + echo "*** uMatrix.firefox: Creating versioned package..." + pushd $DES > /dev/null + zip ../$(basename $DES).xpi -qr * + popd > /dev/null + mv "$BLDIR"/uMatrix.firefox.xpi "$BLDIR"/uMatrix_"$1".firefox.xpi fi echo "*** uMatrix.firefox: Package done."