Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #169 from atdrago/task/create-zip
Browse files Browse the repository at this point in the history
Task/create zip
  • Loading branch information
atdrago committed Nov 5, 2017
2 parents 8662052 + 4caa64a commit 49e55a8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ Currently only Mac OS X is supported.
1. Run `build`
2. Run `test`
- `npm run open` - Starts the app from `dist/Negative-darwin-x64/Negative.app`
- `npm run dmg`
1. Run `build`
2. Move `dist/Negative-darwin-x64/Negative.app` to `dist/release/Negative.app`
3. Create `dist/release/Negative.dmg`
- `npm run build-artifacts`
1. Run `build-sign`
2. Create `dist/Negative-darwin-x64/Negative-v0.10.2.dmg`
3. Create `dist/Negative-darwin-x64/Negative-v0.10.2-mac.zip`

## About
Created by [Adam Drago](http://adamdrago.com). Built on [Electron](http://electron.atom.io/).
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
"prebuild": "rm -rf dist",
"build": "./node_modules/.bin/gulp release && mkdir -p ./release/node_modules && npm install --production --prefix ./release/ && ./node_modules/.bin/gulp build",
"build-sign": "npm run build && ./scripts/sign-osx.sh",
"build-artifacts": "npm run build-sign && ./scripts/artifacts.sh",
"open": "open ./dist/Negative-darwin-x64/Negative.app",
"predmg": "npm run build-sign",
"dmg": "./scripts/dmg.sh",
"postinstall": "./node_modules/.bin/electron-rebuild",
"lint": "./node_modules/.bin/gulp js:lint",
"test": "./node_modules/.bin/mocha --recursive",
Expand Down
19 changes: 19 additions & 0 deletions scripts/artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Setup some generic variables
NEGATIVE_VERSION=$(node -p -e "require('./package.json').version")
DIST_PATH="./dist/Negative-darwin-x64"

# Create DMG
DMG_CONFIG="./resources-osx/appdmg.json"
DMG_PATH="$DIST_PATH/Negative-v$NEGATIVE_VERSION.dmg"

appdmg $DMG_CONFIG $DMG_PATH

# Create ZIP
APP_PATH="Negative.app"
ZIP_PATH="Negative-v$NEGATIVE_VERSION-mac.zip"

## We `cd` first so we don't get "./dist/Negative-darwin-x64" included in our ZIP
cd $DIST_PATH
zip -r $ZIP_PATH $APP_PATH
8 changes: 0 additions & 8 deletions scripts/dmg.sh

This file was deleted.

0 comments on commit 49e55a8

Please sign in to comment.