mirror of https://github.com/gorhill/uBlock.git
Make uAssets a submodule
This commit is contained in:
parent
5560071468
commit
63591ef2aa
|
@ -19,9 +19,7 @@ jobs:
|
|||
persist-credentials: false
|
||||
- name: Clone uAssets
|
||||
run: |
|
||||
pushd ..
|
||||
git clone --depth 1 https://github.com/uBlockOrigin/uAssets.git
|
||||
popd
|
||||
git submodule update --depth 1 --init
|
||||
# https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
|
||||
- name: Get release information
|
||||
id: release_info
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "submodules/uAssets"]
|
||||
path = submodules/uAssets
|
||||
url = https://github.com/uBlockOrigin/uAssets.git
|
|
@ -0,0 +1 @@
|
|||
Subproject commit fabf04d2e6761a733cef539a57267e5133ffb6c9
|
|
@ -11,15 +11,8 @@ cp -R ./assets $DES/
|
|||
|
||||
mkdir $DES/thirdparties
|
||||
|
||||
# Use existing uAssets, or git-clone a temporary one
|
||||
if [ -d "../uAssets" ]; then
|
||||
UASSETS=../uAssets
|
||||
else
|
||||
echo "*** ../uAssets not present, git-cloning..."
|
||||
TMPDIR=$(mktemp -d)
|
||||
UASSETS=$TMPDIR/uAssets
|
||||
git clone --depth=1 https://github.com/uBlockOrigin/uAssets.git $UASSETS
|
||||
fi
|
||||
git submodule update --depth 1 --init
|
||||
UASSETS=submodules/uAssets
|
||||
|
||||
cp -R $UASSETS/thirdparties/easylist-downloads.adblockplus.org $DES/thirdparties/
|
||||
cp -R $UASSETS/thirdparties/pgl.yoyo.org $DES/thirdparties/
|
||||
|
@ -30,9 +23,3 @@ mkdir $DES/ublock
|
|||
cp -R $UASSETS/filters/* $DES/ublock/
|
||||
# Optional filter lists: do not include in package
|
||||
rm $DES/ublock/annoyances.txt
|
||||
|
||||
# Remove temporary git-clone uAssets
|
||||
if [ -n "$TMPDIR" ]; then
|
||||
echo "*** Removing temporary $TMPDIR"
|
||||
rm -rf $TMPDIR
|
||||
fi
|
||||
|
|
|
@ -25,9 +25,9 @@ cp -R src/lib/publicsuffixlist $DES/lib/
|
|||
cp -R src/lib/regexanalyzer $DES/lib/
|
||||
|
||||
mkdir -p $DES/data
|
||||
cp -R ../uAssets/thirdparties/publicsuffix.org/list/* \
|
||||
cp -R submodules/uAssets/thirdparties/publicsuffix.org/list/* \
|
||||
$DES/data
|
||||
cp -R ../uAssets/thirdparties/easylist-downloads.adblockplus.org/* \
|
||||
cp -R submodules/uAssets/thirdparties/easylist-downloads.adblockplus.org/* \
|
||||
$DES/data
|
||||
|
||||
cp platform/browser/*.html $DES/
|
||||
|
|
|
@ -21,15 +21,8 @@ cp -R src/lib/punycode.js $DES/lib/
|
|||
cp -R src/lib/publicsuffixlist $DES/lib/
|
||||
cp -R src/lib/regexanalyzer $DES/lib/
|
||||
|
||||
# Use existing uAssets, or git-clone a temporary one
|
||||
if [ -d "../uAssets" ]; then
|
||||
UASSETS=../uAssets
|
||||
else
|
||||
echo "*** ../uAssets not present, git-cloning..."
|
||||
TMPDIR=$(mktemp -d)
|
||||
UASSETS=$TMPDIR/uAssets
|
||||
git clone --depth=1 https://github.com/uBlockOrigin/uAssets.git $UASSETS
|
||||
fi
|
||||
git submodule update --depth 1 --init
|
||||
UASSETS=submodules/uAssets
|
||||
|
||||
# https://github.com/uBlockOrigin/uBlock-issues/issues/1664#issuecomment-888332409
|
||||
THIRDPARTY=$UASSETS/thirdparties/publicsuffix.org
|
||||
|
@ -42,12 +35,6 @@ node -pe "JSON.stringify(fs.readFileSync('$THIRDPARTY/easylist.txt', 'utf8'))" \
|
|||
node -pe "JSON.stringify(fs.readFileSync('$THIRDPARTY/easyprivacy.txt', 'utf8'))" \
|
||||
> $DES/data/easyprivacy.json
|
||||
|
||||
# Remove temporary git-clone uAssets
|
||||
if [ -n "$TMPDIR" ]; then
|
||||
echo "*** Removing temporary $TMPDIR"
|
||||
rm -rf $TMPDIR
|
||||
fi
|
||||
|
||||
cp platform/nodejs/*.js $DES/
|
||||
cp platform/nodejs/*.json $DES/
|
||||
cp LICENSE.txt $DES/
|
||||
|
|
Loading…
Reference in New Issue