From bcc0803bb5052cbe8aab618a76cd7f095f393b93 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 19 Aug 2023 08:50:20 -0400 Subject: [PATCH] [mv3] Use specific commit URL to pick uBO repo version --- platform/mv3/ubo-version | 2 +- tools/make-mv3.sh | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/platform/mv3/ubo-version b/platform/mv3/ubo-version index 49424e313..1430f30d5 100644 --- a/platform/mv3/ubo-version +++ b/platform/mv3/ubo-version @@ -1 +1 @@ -1.51.1b19 +https://github.com/gorhill/uBlock/tree/f216dc3c4b86518a8f86aa0184b466549873cac5 diff --git a/tools/make-mv3.sh b/tools/make-mv3.sh index 20af9cc23..c0f5e5e38 100755 --- a/tools/make-mv3.sh +++ b/tools/make-mv3.sh @@ -44,12 +44,19 @@ mkdir -p $DES/css/fonts mkdir -p $DES/js mkdir -p $DES/img -if [ "$UBO_VERSION" != "local" ]; then - UBO_VERSION=$(cat platform/mv3/ubo-version) +if [ "$UBO_VERSION" != "HEAD" ]; then + cp platform/mv3/ubo-version $DES/ + UBO_VERSION_URL=$(cat platform/mv3/ubo-version) + UBO_VERSION="${UBO_VERSION_URL: -40}" UBO_REPO="https://github.com/gorhill/uBlock.git" UBO_DIR=$(mktemp -d) echo "*** uBOLite.mv3: Fetching uBO $UBO_VERSION from $UBO_REPO into $UBO_DIR" - git clone -q --depth 1 --branch "$UBO_VERSION" "$UBO_REPO" "$UBO_DIR" + cd "$UBO_DIR" + git init -q + git remote add origin "https://github.com/gorhill/uBlock.git" + git fetch --depth 1 origin "$UBO_VERSION" + git checkout -q FETCH_HEAD + cd .. else UBO_DIR=. fi