2015-05-15 19:56:22 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
|
|
|
cd $ROOT
|
|
|
|
|
|
|
|
# deleting dist
|
|
|
|
echo Deleting dist folder
|
|
|
|
rm -rf $ROOT/dist &>/dev/null 2>&1
|
|
|
|
|
|
|
|
# build the .app
|
|
|
|
echo Building OnionShare.app
|
2016-04-12 02:25:40 -04:00
|
|
|
pyinstaller install/pyinstaller.spec
|
2015-05-15 19:56:22 -04:00
|
|
|
|
2015-05-26 11:54:38 -04:00
|
|
|
if [ "$1" = "--sign" ]; then
|
2016-04-10 18:13:52 -04:00
|
|
|
SIGNING_IDENTITY_APP="3rd Party Mac Developer Application: Micah Lee"
|
|
|
|
SIGNING_IDENTITY_INSTALLER="3rd Party Mac Developer Installer: Micah Lee"
|
2015-05-26 11:54:38 -04:00
|
|
|
|
|
|
|
# codesign the .app
|
2016-04-10 18:13:52 -04:00
|
|
|
codesign -vvvv --deep -s "$SIGNING_IDENTITY_APP" dist/OnionShare.app
|
2015-05-15 21:09:09 -04:00
|
|
|
|
2016-04-10 18:13:52 -04:00
|
|
|
# build .pkg
|
|
|
|
productbuild --component dist/OnionShare.app /Applications dist/OnionShare.pkg --sign "$SIGNING_IDENTITY_INSTALLER"
|
2015-05-26 11:54:38 -04:00
|
|
|
fi
|