pinmenote-extension/bin/build-firefox-prod

27 lines
469 B
Plaintext
Raw Permalink Normal View History

2022-12-17 22:55:05 +01:00
#!/bin/bash
2023-10-31 18:07:25 +01:00
dir_name=pinmenote-firefox-prod
archive_name=firefox-prod
2023-10-31 18:07:25 +01:00
if [ -e "dist/$archive_name.zip" ]
then
echo "release file exists dist/$archive_name.zip"
exit 1
fi
2023-01-05 01:48:38 +01:00
export NODE_ENV=production
2022-12-17 22:55:05 +01:00
# swap manifests
2024-04-07 01:03:07 +02:00
cp manifest/manifest.ff.json src/manifest.json
2023-10-31 18:07:25 +01:00
# clean old dir
rm -r dist/$dir_name
2022-12-17 22:55:05 +01:00
# build
2023-10-30 17:52:16 +01:00
npm run release:ff
2023-10-31 18:07:25 +01:00
2022-12-17 22:55:05 +01:00
# swap manifests back
2024-04-07 01:03:07 +02:00
cp manifest/manifest.dev.json src/manifest.json
2023-10-31 18:07:25 +01:00
# pack build
cd dist/$dir_name
zip -r -X ../$archive_name.zip *