mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-13 15:54:54 +12:00
rename "webext" target to "firefox"
This commit is contained in:
parent
a0c72fc302
commit
a7753fd356
|
@ -2,7 +2,7 @@ sudo: false
|
|||
env:
|
||||
matrix:
|
||||
- BROWSER=chromium EXT=zip
|
||||
- BROWSER=webext EXT=xpi
|
||||
- BROWSER=firefox EXT=xpi
|
||||
script: ./tools/make-${BROWSER}.sh all
|
||||
deploy:
|
||||
provider: releases
|
||||
|
|
18
dist/firefox/publish-signed-beta.py
vendored
18
dist/firefox/publish-signed-beta.py
vendored
|
@ -16,19 +16,19 @@ import zipfile
|
|||
from distutils.version import LooseVersion
|
||||
from string import Template
|
||||
|
||||
# - Download target (raw) uMatrix.webext.xpi from GitHub
|
||||
# - Download target (raw) uMatrix.firefox.xpi from GitHub
|
||||
# - This is referred to as "raw" package
|
||||
# - This will fail if not a dev build
|
||||
# - Modify raw package to make it self-hosted
|
||||
# - This is referred to as "unsigned" package
|
||||
# - Ask AMO to sign uMatrix.webext.xpi
|
||||
# - Ask AMO to sign uMatrix.firefox.xpi
|
||||
# - Generate JWT to be used for communication with server
|
||||
# - Upload unsigned package to AMO
|
||||
# - Wait for a valid download URL for signed package
|
||||
# - Download signed package as uMatrix.webext.signed.xpi
|
||||
# - Download signed package as uMatrix.firefox.signed.xpi
|
||||
# - This is referred to as "signed" package
|
||||
# - Upload uMatrix.webext.signed.xpi to GitHub
|
||||
# - Remove uMatrix.webext.xpi from GitHub
|
||||
# - Upload uMatrix.firefox.signed.xpi to GitHub
|
||||
# - Remove uMatrix.firefox.xpi from GitHub
|
||||
# - Modify updates.json to point to new version
|
||||
# - Commit changes to repo
|
||||
|
||||
|
@ -44,10 +44,10 @@ if not os.path.isfile(version_filepath):
|
|||
|
||||
extension_id = 'uMatrix@raymondhill.net'
|
||||
tmpdir = tempfile.TemporaryDirectory()
|
||||
raw_xpi_filename = 'uMatrix.webext.xpi'
|
||||
raw_xpi_filename = 'uMatrix.firefox.xpi'
|
||||
raw_xpi_filepath = os.path.join(tmpdir.name, raw_xpi_filename)
|
||||
unsigned_xpi_filepath = os.path.join(tmpdir.name, 'uMatrix.webext.unsigned.xpi')
|
||||
signed_xpi_filename = 'uMatrix.webext.signed.xpi'
|
||||
unsigned_xpi_filepath = os.path.join(tmpdir.name, 'uMatrix.firefox.unsigned.xpi')
|
||||
signed_xpi_filename = 'uMatrix.firefox.signed.xpi'
|
||||
signed_xpi_filepath = os.path.join(tmpdir.name, signed_xpi_filename)
|
||||
github_owner = 'gorhill'
|
||||
github_repo = 'uMatrix'
|
||||
|
@ -111,7 +111,7 @@ release_info = response.json()
|
|||
# Extract URL to raw package from metadata
|
||||
#
|
||||
|
||||
# Find url for uMatrix.webext.xpi
|
||||
# Find url for uMatrix.firefox.xpi
|
||||
raw_xpi_url = ''
|
||||
for asset in release_info['assets']:
|
||||
if asset['name'] == signed_xpi_filename:
|
||||
|
|
2
dist/firefox/updates.template.json
vendored
2
dist/firefox/updates.template.json
vendored
|
@ -6,7 +6,7 @@
|
|||
"version": "$version",
|
||||
"applications": { "gecko": { "strict_min_version": "56" } },
|
||||
"update_info_url": "https://github.com/gorhill/uMatrix/releases/tag/$version",
|
||||
"update_link": "https://github.com/gorhill/uMatrix/releases/download/$version/uMatrix.webext.signed.xpi"
|
||||
"update_link": "https://github.com/gorhill/uMatrix/releases/download/$version/uMatrix.firefox.signed.xpi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
38
tools/make-firefox.sh
Executable file
38
tools/make-firefox.sh
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script assumes a linux environment
|
||||
|
||||
echo "*** uMatrix.firefox: Creating web store package"
|
||||
echo "*** uMatrix.firefox: Copying files"
|
||||
|
||||
DES=dist/build/uMatrix.firefox
|
||||
rm -rf $DES
|
||||
mkdir -p $DES
|
||||
|
||||
bash ./tools/make-assets.sh $DES
|
||||
|
||||
cp -R ./src/* $DES/
|
||||
cp platform/chromium/*.html $DES/
|
||||
cp platform/chromium/*.js $DES/js/
|
||||
cp -R platform/chromium/img/* $DES/img/
|
||||
cp LICENSE.txt $DES/
|
||||
|
||||
cp platform/firefox/polyfill.js $DES/js/
|
||||
cp platform/firefox/vapi-cachestorage.js $DES/js/
|
||||
cp platform/firefox/manifest.json $DES/
|
||||
|
||||
# firefox-specific
|
||||
rm $DES/options_ui.html
|
||||
rm $DES/js/options_ui.js
|
||||
|
||||
echo "*** uMatrix.firefox: Generating meta..."
|
||||
python tools/make-firefox-meta.py $DES/
|
||||
|
||||
if [ "$1" = all ]; then
|
||||
echo "*** uMatrix.firefox: Creating package..."
|
||||
pushd $DES > /dev/null
|
||||
zip ../$(basename $DES).xpi -qr *
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
echo "*** uMatrix.firefox: Package done."
|
|
@ -1,38 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script assumes a linux environment
|
||||
|
||||
echo "*** uMatrix.webext: Creating web store package"
|
||||
echo "*** uMatrix.webext: Copying files"
|
||||
|
||||
DES=dist/build/uMatrix.webext
|
||||
rm -rf $DES
|
||||
mkdir -p $DES
|
||||
|
||||
bash ./tools/make-assets.sh $DES
|
||||
|
||||
cp -R ./src/* $DES/
|
||||
cp platform/chromium/*.html $DES/
|
||||
cp platform/chromium/*.js $DES/js/
|
||||
cp -R platform/chromium/img/* $DES/img/
|
||||
cp LICENSE.txt $DES/
|
||||
|
||||
cp platform/webext/polyfill.js $DES/js/
|
||||
cp platform/webext/vapi-cachestorage.js $DES/js/
|
||||
cp platform/webext/manifest.json $DES/
|
||||
|
||||
# webext-specific
|
||||
rm $DES/options_ui.html
|
||||
rm $DES/js/options_ui.js
|
||||
|
||||
echo "*** uMatrix.webext: Generating meta..."
|
||||
python tools/make-webext-meta.py $DES/
|
||||
|
||||
if [ "$1" = all ]; then
|
||||
echo "*** uMatrix.webext: Creating package..."
|
||||
pushd $DES > /dev/null
|
||||
zip ../$(basename $DES).xpi -qr *
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
echo "*** uMatrix.webext: Package done."
|
Loading…
Reference in a new issue