diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 958acad07..933713e59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: persist-credentials: false - name: Clone uAssets run: | - git submodule update --depth 1 --init + tools/pull-assets.sh # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html - name: Get release information id: release_info diff --git a/.gitmodules b/.gitmodules index 3c5855f81..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "submodules/uAssets"] - path = submodules/uAssets - url = https://github.com/uBlockOrigin/uAssets.git diff --git a/Makefile b/Makefile index 3ddf87d30..e8c2b4dcc 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,7 @@ run_options := $(filter-out $@,$(MAKECMDGOALS)) sources := $(wildcard assets/resources/* dist/version src/* src/*/* src/*/*/* src/*/*/*/*) platform := $(wildcard platform/* platform/*/* platform/*/*/* platform/*/*/*/*) -assets := $(wildcard submodules/uAssets/* \ - submodules/uAssets/*/* \ - submodules/uAssets/*/*/* \ - submodules/uAssets/*/*/*/*) +assets := dist/build/uAssets all: chromium firefox npm @@ -61,9 +58,8 @@ mv3-quick: tools/make-mv3.sh $(sources) $(platform) mv3-full: tools/make-mv3.sh $(sources) $(platform) tools/make-mv3.sh full -# Update submodules. -update-submodules: - tools/update-submodules.sh +dist/build/uAssets: + tools/pull-assets.sh clean: rm -rf dist/build tmp/node_modules diff --git a/assets/assets.json b/assets/assets.json index 6840299b7..e475bfbb9 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -177,6 +177,7 @@ "title": "EasyList", "contentURL": [ "https://ublockorigin.github.io/uAssets/thirdparties/easylist.txt", + "assets/thirdparties/easylist/easylist.txt", "assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt" ], "cdnURLs": [ @@ -227,6 +228,7 @@ "title": "EasyPrivacy", "contentURL": [ "https://ublockorigin.github.io/uAssets/thirdparties/easyprivacy.txt", + "assets/thirdparties/easylist/easyprivacy.txt", "assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt" ], "cdnURLs": [ diff --git a/submodules/uAssets b/submodules/uAssets deleted file mode 160000 index af7fc5628..000000000 --- a/submodules/uAssets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit af7fc56287ae5b5ed467862a3aa4aac0c8ce7d5b diff --git a/tools/make-assets.sh b/tools/make-assets.sh index 3850f353a..f26d2fa9f 100755 --- a/tools/make-assets.sh +++ b/tools/make-assets.sh @@ -13,15 +13,20 @@ cp -R ./assets $DES/ mkdir $DES/thirdparties -git submodule update --depth 1 --init -UASSETS=submodules/uAssets +ASSETS_MAIN=dist/build/uAssets/main +ASSETS_PROD=dist/build/uAssets/prod -cp -R $UASSETS/thirdparties/easylist-downloads.adblockplus.org $DES/thirdparties/ -cp -R $UASSETS/thirdparties/pgl.yoyo.org $DES/thirdparties/ -cp -R $UASSETS/thirdparties/publicsuffix.org $DES/thirdparties/ -cp -R $UASSETS/thirdparties/urlhaus-filter $DES/thirdparties/ +cp -R $ASSETS_MAIN/thirdparties/pgl.yoyo.org $DES/thirdparties/ +cp -R $ASSETS_MAIN/thirdparties/publicsuffix.org $DES/thirdparties/ +cp -R $ASSETS_MAIN/thirdparties/urlhaus-filter $DES/thirdparties/ + +mkdir -p $DES/thirdparties/easylist +cp $ASSETS_PROD/thirdparties/easy*.txt $DES/thirdparties/easylist/ mkdir $DES/ublock -cp -R $UASSETS/filters/* $DES/ublock/ -# Optional filter lists: do not include in package -rm $DES/ublock/annoyances.txt +cp $ASSETS_PROD/filters/* $DES/ublock/ + +# Do not include in package +rm $DES/ublock/annoyances.txt +rm $DES/ublock/lan-block.txt +rm $DES/ublock/ubol-filters.txt diff --git a/tools/pull-assets.sh b/tools/pull-assets.sh new file mode 100755 index 000000000..88e268d68 --- /dev/null +++ b/tools/pull-assets.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# +# This script assumes a linux environment + +set -e + +DES=dist/build/uAssets + +echo "*** Pull assets from remote into $DES" +git clone --depth 1 --branch master https://github.com/uBlockOrigin/uAssets $DES/main +git clone --depth 1 --branch gh-pages https://github.com/uBlockOrigin/uAssets $DES/prod