Skip to content

Commit

Permalink
release: update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Feb 6, 2024
1 parent b9b2186 commit f56986a
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f56986a

Please sign in to comment.