mcopy/app/scripts/build_mac.sh

25 lines
756 B
Bash
Raw Normal View History

2017-02-09 14:35:07 +00:00
#!/bin/bash
2021-04-13 18:45:15 +00:00
version=$(jq -r '.version' ./package.json)
mkdir -p ../dist
if [ -f "./.appleIdentity" ]; then
echo "Building, signing and notarizing application..."
node ./scripts/build_and_sign_mac.js
else
echo "Building application..."
./node_modules/.bin/electron-packager . --overwrite --platform=darwin --ignore=^../dist --arch=x64 --prune=true --out=../dist/installers
fi
2021-04-13 18:45:15 +00:00
2018-03-03 02:12:06 +00:00
sleep 5s
2021-04-13 18:45:15 +00:00
mkdir -p ../dist/installers
2021-04-13 18:45:15 +00:00
echo "Building dmg installer..."
2018-03-16 15:20:15 +00:00
./node_modules/.bin/electron-installer-dmg ../dist/mcopy-app-darwin-x64/mcopy-app.app mcopy-app --out=../dist/installers --icon=assets/icons/icon.icns --overwrite
2021-04-13 18:45:15 +00:00
mv "../dist/installers/mcopy-app.dmg" "../dist/installers/mcopy-app_${version}.dmg"
echo "Built installer of version ${version}"