Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Commit

Permalink
rename "webext" target to "firefox"
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Aug 25, 2018
1 parent a0c72fc commit a7753fd
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions dist/firefox/publish-signed-beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
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

Expand All @@ -44,10 +44,10 @@

extension_id = '[email protected]'
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'
Expand Down Expand Up @@ -111,7 +111,7 @@ def input_secret(prompt, token):
# 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:
Expand Down
2 changes: 1 addition & 1 deletion dist/firefox/updates.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions tools/make-firefox.sh
Original file line number Diff line number Diff line change
@@ -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."
38 changes: 0 additions & 38 deletions tools/make-webext.sh

This file was deleted.

0 comments on commit a7753fd

Please sign in to comment.