insomnia/scripts/package.sh

44 lines
1.2 KiB
Bash
Raw Normal View History

2016-04-19 06:05:55 +00:00
#!/bin/bash
#? Package the app
2016-07-14 01:12:42 +00:00
APP_NAME="Insomnia"
APP_ID="com.insomnia.app"
APP_VERSION=$(node -e "console.log(require('./dist/package.json').version)")
COMPANY_NAME="Gregory Schier"
OUT_DIR="build/darwin/v$APP_VERSION"
2016-07-14 01:12:42 +00:00
echo "-- PACKAGING v$APP_VERSION TO $OUT_DIR/... --"
2016-04-21 05:47:03 +00:00
2016-04-20 06:09:46 +00:00
node -r babel-register node_modules/electron-packager/cli.js \
dist \
"$APP_NAME" \
2016-04-28 07:41:31 +00:00
--platform=darwin \
--arch=x64 \
2016-04-23 03:54:55 +00:00
--asar \
2016-07-14 01:12:42 +00:00
--app-version="$APP_VERSION" \
--version-string.CompanyName="$COMPANY_NAME" \
--version-string.ProductName="$APP_NAME" \
2016-07-14 01:12:42 +00:00
--version-string.FileDescription="Beautiful HTTP Client" \
--version-string.OriginalFilename="$APP_ID" \
--version-string.InternalName="$APP_ID" \
2016-04-21 06:00:18 +00:00
--download.strictSSL=true \
2016-04-21 19:58:20 +00:00
--icon=assets/icon \
2016-07-14 01:12:42 +00:00
--out="$OUT_DIR" \
--app-bundle-id="$APP_ID" \
--app-category-type='public.app-category.developer-tools' \
--sign='Developer ID Application: Gregory Schier (7PU3P6ELJ8)' \
--osx-sign \
2016-04-23 03:54:55 +00:00
--overwrite
2016-04-20 06:09:46 +00:00
2016-07-14 01:12:42 +00:00
cd "$OUT_DIR"
DARWIN_DIR="$APP_NAME-darwin-x64"
ZIP_NAME="$APP_NAME-v$APP_VERSION.zip"
mv "$DARWIN_DIR/$APP_NAME.app" .
rm -r "$DARWIN_DIR"
zip -rqyX9 "$ZIP_NAME" "$APP_NAME.app"
rm -r "$APP_NAME.app"
echo "-- PACKAGED $APP_VERSION TO $OUT_DIR --"