mirror of https://github.com/gorhill/uBlock.git
[mv3] Support the tagname being set externally
This commit is contained in:
parent
b2d8c9a0ba
commit
1db17ac4bf
|
@ -3,6 +3,7 @@
|
||||||
# This script assumes a linux environment
|
# This script assumes a linux environment
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
echo "*** uBOLite.mv3: Creating extension"
|
echo "*** uBOLite.mv3: Creating extension"
|
||||||
|
|
||||||
|
@ -26,6 +27,11 @@ for i in "$@"; do
|
||||||
PLATFORM="chromium"
|
PLATFORM="chromium"
|
||||||
shift # past argument=value
|
shift # past argument=value
|
||||||
;;
|
;;
|
||||||
|
(uBOLite_+([0-9]).+([0-9]).+([0-9]).+([0-9]))
|
||||||
|
TAGNAME="$i"
|
||||||
|
FULL="yes"
|
||||||
|
shift # past argument=value
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -119,7 +125,14 @@ if [ "$FULL" = "yes" ]; then
|
||||||
EXTENSION="xpi"
|
EXTENSION="xpi"
|
||||||
fi
|
fi
|
||||||
echo "*** uBOLite.mv3: Creating publishable package..."
|
echo "*** uBOLite.mv3: Creating publishable package..."
|
||||||
PACKAGENAME="uBOLite_$(jq -r .version $DES/manifest.json).$PLATFORM.mv3.$EXTENSION"
|
if [ -z "$TAGNAME" ]; then
|
||||||
|
TAGNAME="uBOLite_$(jq -r .version $DES/manifest.json)"
|
||||||
|
else
|
||||||
|
tmp=$(mktemp)
|
||||||
|
jq --arg tagname "$TAGNAME" '.version = $tagname' "$DES/manifest.json" > "$tmp" \
|
||||||
|
&& mv "$tmp" "$DES/manifest.json"
|
||||||
|
fi
|
||||||
|
PACKAGENAME="$TAGNAME.$PLATFORM.mv3.$EXTENSION"
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
mkdir -p $TMPDIR
|
mkdir -p $TMPDIR
|
||||||
cp -R $DES/* $TMPDIR/
|
cp -R $DES/* $TMPDIR/
|
||||||
|
|
Loading…
Reference in New Issue