From f56986a91563edabf00584c195eb5ec074a146f9 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Tue, 6 Feb 2024 20:15:11 +0100 Subject: [PATCH] release: update build script --- build.sh | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/build.sh b/build.sh index fd7917b..14774df 100755 --- a/build.sh +++ b/build.sh @@ -6,21 +6,13 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$DIR" || exit 1 -# workaround for wrong 20xx version number for the Chrome extension -sed -i -e 's/"version": "/"version": "20/g' package.json || exit 1 -npm run build chrome || exit 1 +# Build the Chrome extension +npm run build-chrome || exit 1 +mv dist/bex/Packaged.qownnotes-web-companion.zip dist/package-chrome.zip || exit 1 -# this is done by replace-in-file-webpack-plugin now -## remove background.scripts from manifest.json for manifest v3 for Chrome -#jq 'del(.background.scripts)' dist/chrome/manifest.json > /tmp/manifest.json && mv /tmp/manifest.json dist/chrome/manifest.json +# Build the Firefox extension +npm run build-firefox || exit 1 +mv dist/bex/Packaged.qownnotes-web-companion.zip dist/package-firefox.zip || exit 1 -# create new package for Chrome (still needs to be done, because the changes replace-in-file-webpack-plugin does are not present in the generated package) -pushd dist/chrome && zip -r ../../packages/chrome.zip . && popd || exit 1 - -# switch back to the correct version number format again -sed -i -e 's/"version": "20/"version": "/g' package.json || exit 1 -npm run build firefox || exit 1 -#npm run build-no-minimize firefox || exit 1 - -# download sourcecode for Mozilla store -curl https://github.com/qownnotes/web-companion/archive/refs/heads/develop.zip -Lo ./packages/sourcecode.zip +# Download sourcecode for Mozilla store +curl https://github.com/qownnotes/web-companion/archive/refs/heads/main.zip -Lo dist/sourcecode.zip