mirror of https://github.com/gorhill/uBlock.git
rename "webext" target to more accurate "firefox"
This commit is contained in:
parent
c9b14e201a
commit
0bf2f27d87
|
@ -15,10 +15,10 @@ version = ''
|
|||
with open(os.path.join(proj_dir, 'dist', 'version')) as f:
|
||||
version = f.read().strip()
|
||||
|
||||
webext_manifest = {}
|
||||
webext_manifest_file = os.path.join(build_dir, 'manifest.json')
|
||||
with open(webext_manifest_file) as f2:
|
||||
webext_manifest = json.load(f2)
|
||||
firefox_manifest = {}
|
||||
firefox_manifest_file = os.path.join(build_dir, 'manifest.json')
|
||||
with open(firefox_manifest_file) as f2:
|
||||
firefox_manifest = json.load(f2)
|
||||
|
||||
match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version)
|
||||
if match:
|
||||
|
@ -27,10 +27,10 @@ if match:
|
|||
builttype = 'b' + str(buildtype)
|
||||
else:
|
||||
builttype = 'rc' + str(buildtype - 100)
|
||||
webext_manifest['version'] = match.group(1) + builttype
|
||||
firefox_manifest['version'] = match.group(1) + builttype
|
||||
else:
|
||||
webext_manifest['version'] = version
|
||||
firefox_manifest['version'] = version
|
||||
|
||||
with open(webext_manifest_file, 'w') as f2:
|
||||
json.dump(webext_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
|
||||
with open(firefox_manifest_file, 'w') as f2:
|
||||
json.dump(firefox_manifest, f2, indent=2, separators=(',', ': '), sort_keys=True)
|
||||
f2.write('\n')
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
#
|
||||
# This script assumes a linux environment
|
||||
|
||||
echo "*** uBlock0.webext: Creating web store package"
|
||||
echo "*** uBlock0.webext: Copying files"
|
||||
echo "*** uBlock0.firefox: Creating web store package"
|
||||
echo "*** uBlock0.firefox: Copying files"
|
||||
|
||||
DES=dist/build/uBlock0.webext
|
||||
DES=dist/build/uBlock0.firefox
|
||||
rm -rf $DES
|
||||
mkdir -p $DES
|
||||
|
||||
|
@ -24,11 +24,11 @@ cp platform/chromium/*.html $DES/
|
|||
cp platform/chromium/*.json $DES/
|
||||
cp LICENSE.txt $DES/
|
||||
|
||||
cp platform/webext/manifest.json $DES/
|
||||
cp platform/webext/vapi-usercss.js $DES/js/
|
||||
cp platform/webext/vapi-webrequest.js $DES/js/
|
||||
cp platform/firefox/manifest.json $DES/
|
||||
cp platform/firefox/vapi-usercss.js $DES/js/
|
||||
cp platform/firefox/vapi-webrequest.js $DES/js/
|
||||
|
||||
echo "*** uBlock0.webext: concatenating content scripts"
|
||||
echo "*** uBlock0.firefox: concatenating content scripts"
|
||||
cat $DES/js/vapi-usercss.js > /tmp/contentscript.js
|
||||
echo >> /tmp/contentscript.js
|
||||
grep -v "^'use strict';$" $DES/js/vapi-usercss.real.js >> /tmp/contentscript.js
|
||||
|
@ -39,23 +39,23 @@ rm $DES/js/vapi-usercss.js
|
|||
rm $DES/js/vapi-usercss.real.js
|
||||
rm $DES/js/vapi-usercss.pseudo.js
|
||||
|
||||
# Webext-specific
|
||||
# Firefox/webext-specific
|
||||
rm $DES/img/icon_128.png
|
||||
rm $DES/options_ui.html
|
||||
rm $DES/js/options_ui.js
|
||||
|
||||
echo "*** uBlock0.chromium: Generating web accessible resources..."
|
||||
echo "*** uBlock0.firefox: Generating web accessible resources..."
|
||||
cp -R src/web_accessible_resources $DES/
|
||||
python3 tools/import-war.py $DES/
|
||||
|
||||
echo "*** uBlock0.webext: Generating meta..."
|
||||
python tools/make-webext-meta.py $DES/
|
||||
echo "*** uBlock0.firefox: Generating meta..."
|
||||
python tools/make-firefox-meta.py $DES/
|
||||
|
||||
if [ "$1" = all ]; then
|
||||
echo "*** uBlock0.webext: Creating package..."
|
||||
echo "*** uBlock0.firefox: Creating package..."
|
||||
pushd $DES > /dev/null
|
||||
zip ../$(basename $DES).xpi -qr *
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
echo "*** uBlock0.webext: Package done."
|
||||
echo "*** uBlock0.firefox: Package done."
|
||||
|
|
Loading…
Reference in New Issue