diff --git a/Dockerfile b/Dockerfile index 79d7c0f38..f2a28e638 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,9 @@ RUN apk update && apk add --no-cache \ optipng \ zip -RUN mkdir -p /usr/share && \ - cd /usr/share \ - && curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xj \ - && ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs +# Fixes PhantomJS +# https://github.com/dustinblackman/phantomized +RUN curl -Ls "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C / RUN apk del \ curl diff --git a/bin/build b/bin/build index 2c2941ba6..9f38e3454 100755 --- a/bin/build +++ b/bin/build @@ -2,17 +2,31 @@ cd "$(dirname $0)/.." +version="$2" + +if [[ -z "$version" ]]; then + current=$(grep '"version":' src/drivers/webextension/manifest.json | sed 's/^.*"version": "\(.*\)".*$/\1/') + + echo "No version specified. Current version is $current." + + exit 1; +fi + set -eu ./bin/validate +echo "Deleting junk files..." + +find . -name ".DS_Store" -exec rm {} \; + echo "Prettifying apps.json..." jsonlint-cli -ist $'\t' src/apps.json echo "Converting SVG icons to PNG..." -#svg2png-many -i src/icons/ -o src/icons/converted/ --width=32 --height=32 +svg2png-many -i src/icons/ -o src/icons/converted/ --width=32 --height=32 echo "Compressing PNG icons..." @@ -23,6 +37,9 @@ optipng -quiet "src/icons/converted/*.png" set -e +# NPM +sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" src/drivers/npm/package.json + # WebExtension echo "Building WebExtension..." @@ -30,6 +47,8 @@ webextension_dir=src/drivers/webextension pushd $webextension_dir > /dev/null +sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" manifest.json + zip -qr ../../../build/wappalyzer_webextension.zip . popd > /dev/null @@ -45,6 +64,8 @@ manifest_dir="Wappalyzer/edgeextension/manifest" mv $webextension_dir/manifest.json $webextension_dir/manifest.webextension.json mv $webextension_dir/manifest.edge.json $webextension_dir/manifest.json +sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" $webextension_dir/manifest.json + manifoldjs -l debug -p edgeextension -f edgeextension -m $webextension_dir/manifest.json # Replace symlinks with actual files @@ -74,4 +95,4 @@ rm -rf Wappalyzer popd > /dev/null -echo "Done." +echo "Done (v$version)." diff --git a/package.json b/package.json index dd2dbe93d..2148f0f67 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,7 @@ "dependencies": { "file-type": "3.8.*", "is-svg": "2.0.*", - "read-chunk": "2.0.*", - "svg2png-many": "*" + "read-chunk": "2.0.*" } } diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index e588c0b14..921016f88 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -2,7 +2,7 @@ "name": "wappalyzer", "description": "Uncovers the technologies used on websites", "homepage": "https://github.com/AliasIO/Wappalyzer", - "version": "5.1.1", + "version": "5.1.2", "author": "Elbert Alias", "license": "GPL-3.0", "repository": { diff --git a/src/drivers/webextension/manifest.edge.json b/src/drivers/webextension/manifest.edge.json index 4d50e5f47..50cb00946 100644 --- a/src/drivers/webextension/manifest.edge.json +++ b/src/drivers/webextension/manifest.edge.json @@ -4,7 +4,7 @@ "author": "Elbert Alias", "homepage_url": "https://wappalyzer.com/", "description": "Identify web technologies", - "version": "5.1.1", + "version": "5.1.2", "default_locale": "en", "manifest_version": 2, "icons": { diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.json index 371a312c6..957da7969 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.json @@ -4,7 +4,7 @@ "author": "Elbert Alias", "homepage_url": "https://wappalyzer.com/", "description": "Identify web technologies", - "version": "5.1.1", + "version": "5.1.2", "default_locale": "en", "manifest_version": 2, "icons": { @@ -43,7 +43,7 @@ }, { "matches": [ - "http://*/*", + "http://*/*", "https://*/*" ], "js": [