Skip to content

Commit

Permalink
Option to force TLD updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackademix committed Oct 6, 2018
1 parent 55ccd14 commit 37303cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.sh
Expand Up @@ -38,15 +38,15 @@ if [ "$1" == "bump" ]; then
echo "Bumping to $VER"
git add "$MANIFEST_IN"
git commit -m "Version bump: $VER."
[[ $VER == *rc* ]] || "$0" tag
[[ $VER == *rc* ]] || "$0" tag
exit
fi
XPI_DIR="$BASE/xpi"
XPI="$XPI_DIR/noscript-$VER"
LIB="$SRC/lib"
TLD="$BASE/TLD"

if ! [ $(date -r "$LIB/tld.js" +'%Y%m%d') -ge $(date +'%Y%m%d') ] && "$TLD/generate.sh" "$LIB/tld.js"; then
if ! [ $(date -r "$LIB/tld.js" +'%Y%m%d') -ge $(date +'%Y%m%d') -a "$1" != "tld" ] && "$TLD/generate.sh" "$LIB/tld.js"; then
cp -u "$TLD/tld.js" "$LIB"
fi

Expand All @@ -58,7 +58,7 @@ cp -p LICENSE.txt GPL.txt "$BUILD"/

BUILD_CMD="web-ext"
BUILD_OPTS="build"

if [[ $VER == *rc* ]]; then
sed -re 's/^(\s+)"strict_min_version":.*$/\1"update_url": "https:\/\/secure.informaction.com\/update\/?v='$VER'",\n\0/' \
"$MANIFEST_IN" > "$MANIFEST_OUT"
Expand Down

0 comments on commit 37303cc

Please sign in to comment.