mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Use git clone
instead of submodule to pull uAssets dependencies
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2358 We need two different branches of uAssets to properly add the default filter lists into the packages. I couldn't figure out how to do this with submodules, using simple `git clone` as a dependency just work.
This commit is contained in:
parent
90ca2ad3cf
commit
17590c5a0c
7 changed files with 31 additions and 21 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Clone uAssets
|
- name: Clone uAssets
|
||||||
run: |
|
run: |
|
||||||
git submodule update --depth 1 --init
|
tools/pull-assets.sh
|
||||||
# https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
|
# https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
|
||||||
- name: Get release information
|
- name: Get release information
|
||||||
id: release_info
|
id: release_info
|
||||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "submodules/uAssets"]
|
|
||||||
path = submodules/uAssets
|
|
||||||
url = https://github.com/uBlockOrigin/uAssets.git
|
|
10
Makefile
10
Makefile
|
@ -6,10 +6,7 @@ run_options := $(filter-out $@,$(MAKECMDGOALS))
|
||||||
|
|
||||||
sources := $(wildcard assets/resources/* dist/version src/* src/*/* src/*/*/* src/*/*/*/*)
|
sources := $(wildcard assets/resources/* dist/version src/* src/*/* src/*/*/* src/*/*/*/*)
|
||||||
platform := $(wildcard platform/* platform/*/* platform/*/*/* platform/*/*/*/*)
|
platform := $(wildcard platform/* platform/*/* platform/*/*/* platform/*/*/*/*)
|
||||||
assets := $(wildcard submodules/uAssets/* \
|
assets := dist/build/uAssets
|
||||||
submodules/uAssets/*/* \
|
|
||||||
submodules/uAssets/*/*/* \
|
|
||||||
submodules/uAssets/*/*/*/*)
|
|
||||||
|
|
||||||
all: chromium firefox npm
|
all: chromium firefox npm
|
||||||
|
|
||||||
|
@ -61,9 +58,8 @@ mv3-quick: tools/make-mv3.sh $(sources) $(platform)
|
||||||
mv3-full: tools/make-mv3.sh $(sources) $(platform)
|
mv3-full: tools/make-mv3.sh $(sources) $(platform)
|
||||||
tools/make-mv3.sh full
|
tools/make-mv3.sh full
|
||||||
|
|
||||||
# Update submodules.
|
dist/build/uAssets:
|
||||||
update-submodules:
|
tools/pull-assets.sh
|
||||||
tools/update-submodules.sh
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf dist/build tmp/node_modules
|
rm -rf dist/build tmp/node_modules
|
||||||
|
|
|
@ -177,6 +177,7 @@
|
||||||
"title": "EasyList",
|
"title": "EasyList",
|
||||||
"contentURL": [
|
"contentURL": [
|
||||||
"https://ublockorigin.github.io/uAssets/thirdparties/easylist.txt",
|
"https://ublockorigin.github.io/uAssets/thirdparties/easylist.txt",
|
||||||
|
"assets/thirdparties/easylist/easylist.txt",
|
||||||
"assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt"
|
"assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt"
|
||||||
],
|
],
|
||||||
"cdnURLs": [
|
"cdnURLs": [
|
||||||
|
@ -227,6 +228,7 @@
|
||||||
"title": "EasyPrivacy",
|
"title": "EasyPrivacy",
|
||||||
"contentURL": [
|
"contentURL": [
|
||||||
"https://ublockorigin.github.io/uAssets/thirdparties/easyprivacy.txt",
|
"https://ublockorigin.github.io/uAssets/thirdparties/easyprivacy.txt",
|
||||||
|
"assets/thirdparties/easylist/easyprivacy.txt",
|
||||||
"assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt"
|
"assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt"
|
||||||
],
|
],
|
||||||
"cdnURLs": [
|
"cdnURLs": [
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit af7fc56287ae5b5ed467862a3aa4aac0c8ce7d5b
|
|
|
@ -13,15 +13,20 @@ cp -R ./assets $DES/
|
||||||
|
|
||||||
mkdir $DES/thirdparties
|
mkdir $DES/thirdparties
|
||||||
|
|
||||||
git submodule update --depth 1 --init
|
ASSETS_MAIN=dist/build/uAssets/main
|
||||||
UASSETS=submodules/uAssets
|
ASSETS_PROD=dist/build/uAssets/prod
|
||||||
|
|
||||||
cp -R $UASSETS/thirdparties/easylist-downloads.adblockplus.org $DES/thirdparties/
|
cp -R $ASSETS_MAIN/thirdparties/pgl.yoyo.org $DES/thirdparties/
|
||||||
cp -R $UASSETS/thirdparties/pgl.yoyo.org $DES/thirdparties/
|
cp -R $ASSETS_MAIN/thirdparties/publicsuffix.org $DES/thirdparties/
|
||||||
cp -R $UASSETS/thirdparties/publicsuffix.org $DES/thirdparties/
|
cp -R $ASSETS_MAIN/thirdparties/urlhaus-filter $DES/thirdparties/
|
||||||
cp -R $UASSETS/thirdparties/urlhaus-filter $DES/thirdparties/
|
|
||||||
|
mkdir -p $DES/thirdparties/easylist
|
||||||
|
cp $ASSETS_PROD/thirdparties/easy*.txt $DES/thirdparties/easylist/
|
||||||
|
|
||||||
mkdir $DES/ublock
|
mkdir $DES/ublock
|
||||||
cp -R $UASSETS/filters/* $DES/ublock/
|
cp $ASSETS_PROD/filters/* $DES/ublock/
|
||||||
# Optional filter lists: do not include in package
|
|
||||||
rm $DES/ublock/annoyances.txt
|
# Do not include in package
|
||||||
|
rm $DES/ublock/annoyances.txt
|
||||||
|
rm $DES/ublock/lan-block.txt
|
||||||
|
rm $DES/ublock/ubol-filters.txt
|
||||||
|
|
11
tools/pull-assets.sh
Executable file
11
tools/pull-assets.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue