Browse Source

Merge pull request #599 from mrfelton/build/publish-zap

build: auto release
renovate/lint-staged-8.x
JimmyMow 7 years ago
committed by GitHub
parent
commit
e3528bbee7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 48
      .travis.yml
  2. 19
      appveyor.yml
  3. 93
      package.json
  4. 0
      resources/icons/icon.icns
  5. 0
      resources/icons/icon.ico
  6. 0
      resources/icons/icon.png

48
.travis.yml

@ -5,13 +5,14 @@ language: node_js
env:
global:
- DEBUG=electron-builder
matrix:
- TEST=lint-ci
- TEST=test-ci
os:
- linux
- osx
node_js:
- node
- 8
- lts/*
cache:
apt: true
@ -24,14 +25,14 @@ cache:
addons:
apt:
packages:
- icnsutils
- graphicsmagick
- xz-utils
- xorriso
- xvfb
install:
- yarn
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- |
if [ $TRAVIS_OS_NAME == "linux" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
fi
before_script:
- export DISPLAY=:99.0
@ -39,4 +40,31 @@ before_script:
- sleep 3
script:
- "travis_wait 30 yarn $TEST"
- yarn lint-ci || travis_terminate 1
- yarn build || travis_terminate 1
- yarn test-ci || travis_terminate 1
- yarn coveralls || travis_terminate 1
jobs:
include:
- stage: deploy
name: Deploy to Github
script: skip
deploy:
skip_cleanup: true
provider: script
script: yarn release
on:
repo: LN-Zap/zap-desktop
branch: master
- os: osx
name: Deploy to Github
script: skip
deploy:
skip_cleanup: true
provider: script
script: yarn release
on:
repo: LN-Zap/zap-desktop
branch: master

19
appveyor.yml

@ -1,13 +1,17 @@
os: unstable
environment:
DEBUG: electron-builder
matrix:
- nodejs_version: 10
- nodejs_version: 8
- nodejs_version: STABLE
publish_build: true
- nodejs_version: LTS
cache:
- '%APPDATA%\npm-cache'
- "%LOCALAPPDATA%/Yarn"
- node_modules -> package.json
- flow-typed
- app/node_modules -> app/package.json
matrix:
@ -27,8 +31,9 @@ install:
- yarn
test_script:
- node --version
- yarn lint
- yarn package
- yarn test
- yarn test-e2e
- yarn lint-ci
- yarn build
- yarn test-ci
deploy_script:
- cmd: powershell if (($env:appveyor_repo_name -eq 'LN-Zap/zap-desktop') -and ($env:appveyor_repo_branch -eq 'master') -and ($env:publish_build)) { yarn release }

93
package.json

@ -10,6 +10,8 @@
"build-renderer": "webpack --require babel-register --config webpack.config.renderer.prod.js --progress",
"build-grpc": "rimraf app/node_modules/grpc/src/node && build install-app-deps",
"clean": "rimraf node_modules app/node_modules dll app/dist",
"coverage": "open coverage/index.html",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"dev": "cross-env START_HOT=1 npm run start-renderer-dev",
"fetch-lnd": "node ./internals/scripts/fetch-lnd-for-packaging.js",
"flow": "flow",
@ -23,23 +25,18 @@
"lint-styles-fix-base": "npm run lint-styles-base -- --fix",
"lint-styles-fix": "npm run lint-styles-fix-base -- $npm_package_config_style_paths",
"lint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check",
"lint-ci": "npm run lint && npm run lint-styles && npm run flow",
"package": "npm run build && rimraf app/node_modules/grpc/src/node && npm run fetch-lnd && build --publish never",
"package-mac": "npm run package -- --platform mac --arch all && npm run build-grpc",
"package-win": "npm run package -- --platform win --arch all && npm run build-grpc",
"package-linux": "npm_config_target_libc=glibc npm run package -- --platform linux --arch all && npm run build-grpc",
"package-all": "npm run package-mac && npm run package-win && npm run package-linux",
"lint-ci": "npm run lint && npm run lint-styles",
"package": "npm run build && npm run fetch-lnd && build",
"release": "npm run package -- --publish onTagOrDraft",
"postinstall": "concurrently --raw \"npm:flow-typed\" \"npm:build-dll\" \"build install-app-deps\" \"node node_modules/fbjs-scripts/node/check-dev-engines.js package.json\"",
"prestart": "npm run build",
"start": "cross-env NODE_ENV=production electron ./app/",
"start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r babel-register ./app/main.dev",
"start-renderer-dev": "node --trace-warnings -r babel-register ./node_modules/webpack-serve/lib/cli.js --config webpack.config.renderer.dev.js",
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js",
"test-ci": "npm run package && npm run test-e2e && npm run test && npm run coveralls",
"test-all": "npm run lint && npm run lint-styles && npm run flow && npm run build && npm run test-e2e && npm run test",
"test-e2e": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js e2e",
"coverage": "open coverage/index.html",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
"test-ci": "npm run test && npm run test-e2e",
"test-all": "npm run lint && npm run lint-styles && npm run flow && npm run build && npm run test && npm run test-e2e",
"test-e2e": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js e2e"
},
"config": {
"style_paths": "app/styles/*.scss app/components/**/*.scss",
@ -58,8 +55,9 @@
"yarn": ">=0.21.3"
},
"build": {
"productName": "Zap",
"productName": "ZapDesktop",
"appId": "org.develar.ZapDesktop",
"generateUpdatesFilesForAllChannels": true,
"files": [
"dist/",
"node_modules/",
@ -67,8 +65,31 @@
"main.prod.js.map",
"package.json"
],
"directories": {
"buildResources": "resources",
"output": "release"
},
"extraResources": [
"resources/lnd.conf",
"resources/rpc.proto",
{
"from": "resources/bin/${os}/${arch}",
"to": "bin",
"filter": [
"lnd*"
]
}
],
"artifactName": "${productName}-${platform}-${arch}-v${version}.${ext}",
"mac": {
"category": "public.app-category.finance",
"icon": "resources/icons/icon.icns",
"target": [
"dmg",
"zip"
]
},
"dmg": {
"icon": "./resources/icon.icns",
"contents": [
{
"x": 130,
@ -83,33 +104,37 @@
]
},
"win": {
"icon": "./resources/icon.ico",
"icon": "resources/icons/icon.ico",
"target": [
"nsis"
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
},
"linux": {
"category": "Utility",
"category": "Finance",
"icon": "resources/icons/icon.png",
"target": [
"deb",
"AppImage"
{
"target": "deb",
"arch": [
"x64",
"ia32"
]
},
{
"target": "AppImage",
"arch": [
"x64",
"ia32"
]
}
]
},
"directories": {
"buildResources": "resources",
"output": "release"
},
"extraResources": [
"resources/lnd.conf",
"resources/rpc.proto",
{
"from": "resources/bin/${os}/${arch}",
"to": "bin",
"filter": [
"lnd*"
]
}
]
}
},
"repository": {
"type": "git",

0
resources/icon.icns → resources/icons/icon.icns

0
resources/icon.ico → resources/icons/icon.ico

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

0
resources/icon.png → resources/icons/icon.png

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save