mirror of
https://github.com/gorhill/uBlock.git
synced 2025-10-05 21:32:39 +02:00
Update makefile
This commit is contained in:
73
Makefile
73
Makefile
@@ -4,7 +4,9 @@ run_options := $(filter-out $@,$(MAKECMDGOALS))
|
||||
.PHONY: all clean cleanassets test lint chromium opera firefox npm dig \
|
||||
mv3-chromium mv3-firefox mv3-edge mv3-safari ubol-codemirror \
|
||||
compare maxcost medcost mincost modifiers record wasm \
|
||||
publish-chromium publish-edge
|
||||
publish-chromium publish-edge publish-firefox \
|
||||
publish-dev-chromium publish-dev-firefox \
|
||||
upload-firefox upload-dev-firefox
|
||||
|
||||
sources := ./dist/version $(shell find ./assets -type f) $(shell find ./src -type f)
|
||||
platform := $(wildcard platform/*/*)
|
||||
@@ -106,11 +108,76 @@ clean:
|
||||
cleanassets:
|
||||
rm -rf dist/build/mv3-data dist/build/uAssets
|
||||
|
||||
# Usage: make publish-publish version=?
|
||||
publish-chromium:
|
||||
node publish-extension/publish-chromium.js ghowner=gorhill ghrepo=uBlock ghtag=$(version) cwsid=cjpalhdlnbpafiamejdnhcphjbkeiagm
|
||||
node publish-extension/publish-chromium.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=chromium \
|
||||
storeid=cjpalhdlnbpafiamejdnhcphjbkeiagm
|
||||
|
||||
# Usage: make publish-edge version=?
|
||||
publish-edge:
|
||||
node publish-extension/publish-edge.js ghowner=gorhill ghrepo=uBlock ghtag=$(version) edgeid=$(UBO_EDGE_ID)
|
||||
node publish-extension/publish-edge.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=chromium \
|
||||
datebasedmajor=1 \
|
||||
storeid=odfafepnkmbhccpbejgmiehpchacaeak \
|
||||
productid=$(UBO_EDGE_ID)
|
||||
|
||||
# Usage: make publish-firefox version=?
|
||||
publish-firefox:
|
||||
node publish-extension/publish-firefox.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=firefox \
|
||||
storeid=uBlock0@raymondhill.net \
|
||||
channel=listed
|
||||
|
||||
# Usage: make publish-dev-chromium version=?
|
||||
publish-dev-chromium:
|
||||
node publish-extension/publish-chromium.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=chromium \
|
||||
storeid=cgbcahbpdhpcegmbfconppldiemgcoii
|
||||
|
||||
# Usage: make publish-dev-firefox version=?
|
||||
publish-dev-firefox:
|
||||
node publish-extension/publish-firefox.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=firefox \
|
||||
storeid=uBlock0@raymondhill.net \
|
||||
channel=unlisted \
|
||||
updatepath=./dist/firefox.updates.json
|
||||
|
||||
# Usage: make upload-firefox version=?
|
||||
upload-firefox:
|
||||
node publish-extension/upload-firefox.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=firefox \
|
||||
storeid=uBlock0@raymondhill.net \
|
||||
channel=listed
|
||||
|
||||
# Usage: make upload-dev-firefox version=?
|
||||
upload-dev-firefox:
|
||||
node publish-extension/upload-firefox.js \
|
||||
ghowner=gorhill \
|
||||
ghrepo=uBlock \
|
||||
ghtag=$(version) \
|
||||
ghasset=firefox \
|
||||
storeid=uBlock0@raymondhill.net \
|
||||
channel=unlisted \
|
||||
updatepath=./dist/firefox.updates.json
|
||||
|
||||
# Not real targets, just convenient for auto-completion at shell prompt
|
||||
compare:
|
||||
|
@@ -26,7 +26,7 @@ for i in "$@"; do
|
||||
safari)
|
||||
PLATFORM="safari"
|
||||
;;
|
||||
uBOLite_+([0-9]).+([0-9]).+([0-9]))
|
||||
+([0-9]).+([0-9]).+([0-9]))
|
||||
TAGNAME="$i"
|
||||
FULL="yes"
|
||||
;;
|
||||
@@ -151,7 +151,7 @@ echo "Extension location: $UBOL_DIR/"
|
||||
tmp_manifest=$(mktemp)
|
||||
chmod '=rw' "$tmp_manifest"
|
||||
if [ -z "$TAGNAME" ]; then
|
||||
TAGNAME="uBOLite_$(jq -r .version "$UBOL_DIR"/manifest.json)"
|
||||
TAGNAME="$(jq -r .version "$UBOL_DIR"/manifest.json)"
|
||||
# Enable DNR rule debugging
|
||||
jq '.permissions += ["declarativeNetRequestFeedback"]' \
|
||||
"$UBOL_DIR/manifest.json" > "$tmp_manifest" \
|
||||
@@ -162,7 +162,7 @@ if [ -z "$TAGNAME" ]; then
|
||||
&& mv "$tmp_manifest" "$UBOL_DIR/manifest.json"
|
||||
fi
|
||||
else
|
||||
jq --arg version "${TAGNAME:8}" '.version = $version' "$UBOL_DIR/manifest.json" > "$tmp_manifest" \
|
||||
jq --arg version "${TAGNAME}" '.version = $version' "$UBOL_DIR/manifest.json" > "$tmp_manifest" \
|
||||
&& mv "$tmp_manifest" "$UBOL_DIR/manifest.json"
|
||||
fi
|
||||
|
||||
@@ -184,7 +184,7 @@ if [ "$FULL" = "yes" ]; then
|
||||
EXTENSION="xpi"
|
||||
fi
|
||||
echo "*** uBOLite.mv3: Creating publishable package..."
|
||||
UBOL_PACKAGE_NAME="$TAGNAME.$PLATFORM.mv3.$EXTENSION"
|
||||
UBOL_PACKAGE_NAME="uBOLite_$TAGNAME.$PLATFORM.$EXTENSION"
|
||||
UBOL_PACKAGE_DIR=$(mktemp -d)
|
||||
mkdir -p "$UBOL_PACKAGE_DIR"
|
||||
cp -R "$UBOL_DIR"/* "$UBOL_PACKAGE_DIR"/
|
||||
|
Reference in New Issue
Block a user