improve workflow
This commit is contained in:
parent
477e40e433
commit
2143bc7b77
4 changed files with 13 additions and 14 deletions
12
scripts/install.sh
Executable file
12
scripts/install.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
# Electron's version.
|
||||
export npm_config_target=1.2.3
|
||||
# The architecture of Electron, can be ia32 or x64.
|
||||
export npm_config_arch=x64
|
||||
# Download headers for Electron.
|
||||
export npm_config_disturl=https://atom.io/download/atom-shell
|
||||
# Tell node-pre-gyp that we are building for Electron.
|
||||
export npm_config_runtime=electron
|
||||
# Tell node-pre-gyp to build module from source code.
|
||||
export npm_config_build_from_source=true
|
||||
# Install all dependencies, and store cache to ~/.electron-gyp.
|
||||
HOME=~/.electron-gyp npm install
|
||||
22
scripts/package.sh
Executable file
22
scripts/package.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
VERSION=`node -e 'process.stdout.write(require("./package").version)'`
|
||||
rm -rf node_modules
|
||||
rm -rf ./app/node_modules
|
||||
rm -rf ./dist/HyperTerm-darwin-x64
|
||||
rm -rf ./dist/
|
||||
rm -rf ./build/
|
||||
mkdir build
|
||||
./install.sh
|
||||
npm run lint
|
||||
cd app
|
||||
npm install
|
||||
npm run lint
|
||||
npm run build
|
||||
cd -
|
||||
cp app/index.html build/
|
||||
cp -r app/dist build/
|
||||
mkdir dist
|
||||
electron-packager ./ --platform=darwin --out=dist --arch=x64 --app-bundle-id="co.zeit.hyperterm" --app-version="$VERSION" --osx-sign --icon=static/icon.icns --prune --ignore=app/
|
||||
cd dist/HyperTerm-darwin-x64/
|
||||
zip -r -y ../hyperterm-macos-x64-$VERSION.zip .
|
||||
cd -
|
||||
Loading…
Add table
Add a link
Reference in a new issue