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=fiefox-prod
|
|
|
|
|
|
|
|
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
|
2023-09-22 03:18:30 +02:00
|
|
|
cp src/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
|
2023-10-31 18:07:25 +01:00
|
|
|
cp src/manifest.dev.json src/manifest.json
|
|
|
|
|
|
|
|
# pack build
|
|
|
|
cd dist/$dir_name
|
|
|
|
zip -r ../$archive_name.zip *
|