Skip to content

Commit

Permalink
chore: reconfiguring build process
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodek committed Oct 2, 2019
1 parent cf19c26 commit 1195d12
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 84 deletions.
47 changes: 32 additions & 15 deletions .travis.yml
@@ -1,23 +1,40 @@
os:
- linux
- osx
dist: xenial
services:
- xvfb
language: node_js
node_js:
- '10'
matrix:
include:
- os: osx
osx_image: xcode10.2
language: node_js
node_js: "10"
services:
- xvfb
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

- os: linux
services:
- docker
- xvfb
language: generic

cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
sudo: required
install:
- npm ci
script: "./test/travis-build.sh"
# after_success:
# - openssl aes-256-cbc -K $encrypted_36ee0d5a95ce_key -iv $encrypted_36ee0d5a95ce_iv
# -in tasks/advancedrestclient.pfx.enc -out tasks/advancedrestclient.pfx -d
# - openssl aes-256-cbc -K $encrypted_36ee0d5a95ce_key -iv $encrypted_36ee0d5a95ce_iv
# -in tasks/mac-app-distribution-cert.p12.enc -out tasks/mac-app-distribution-cert.p12 -d
# - ./tasks/install-build-deps.sh
# - node tasks/build-success.js
after_success:
- openssl aes-256-cbc -K $encrypted_36ee0d5a95ce_key -iv $encrypted_36ee0d5a95ce_iv
-in tasks/advancedrestclient.pfx.enc -out tasks/advancedrestclient.pfx -d
- openssl aes-256-cbc -K $encrypted_36ee0d5a95ce_key -iv $encrypted_36ee0d5a95ce_iv
-in tasks/mac-app-distribution-cert.p12.enc -out tasks/mac-app-distribution-cert.p12 -d
- node tasks/arc-publish.sh
env:
global:
- secure: NQtwpDyG5qcPNDVJvHUn2LQKqAI3BYFektAQb7RyCD/eDlzA1b3Orv8nnOPmZ6H05YJBO00RRpvPDAc2944pm7XqY0HuDB0KBjUjb3kLAChiD9D7SKAnTJ4Lvjfyyf6eVXdDRBU5hTFKtsABfn/hIz+J/XVInDVaPOYIeTB70BsgMzkVlDj0hsyM2n7AvPzHupBsgpTL/hGNR0pm45oSV5c9mM72JGy84c6rAW01DLC7N6CgVkRNjAIQ4SYbZj57kO3WLXJ9Hryhqz5manq84R/j5Jg9XggR3+XCvloyFKXYO3n+ogw4zV3Ie81JDqbLJA4u2ayJ8h9wHaUWoSroW594xQchqsAVypnc/fgvHOxRrSozRDja3q9kKdJ/7nSOJ3k1jsy1gJEaDT0OO2py/OQ6F+1gfvMVmID30mL1m5UR9ARpwLyn+gezw4zvCt3JQv3WjzRZzsBhtCj5Mt75GRJK4bROsELO3tDLYzjewI/1tCw/xst097G5MCImVxepOrnlDguqij+0gpE10Pdwto/VUQBvlakLGXSF6CcatXiyIkwVpQEaKT9HGUHXXY51UoMwxS5CvzkvyAEzNam5/GRv6ifDJal0jHe4bLSUHJwC3CQDjZG3LVcIr+SpuEZ/Kq5/Kvr/1QoWAwoMBrCAkdoZmw7gyflm2d/pXsy9pBE=
Expand Down
221 changes: 221 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"start": "electron . --inspect --debug --debug-level=\"silly\" --workspace-path=\"~/arc-dev/workspace\" --settings-file=\"~/arc-dev/dev-settings.json\" --themes-path=\"~/arc-dev/themes\"",
"postinstall": "electron-builder install-app-deps",
"postinstall": "electron-rebuild && electron-builder install-app-deps",
"prepare": "pika-web && node tasks/prepare-app.js",
"test": "npm run test-main && npm run test-renderer && npm run test-app",
"test-main": "NODE_ENV=test ELECTRON_PATH=node_modules/.bin/electron electron-mocha test/**/*.main.spec.js scripts/packages/**/*.main.spec.js",
Expand All @@ -38,12 +38,12 @@
"@advanced-rest-client/arc-definitions": "^3.0.0",
"@advanced-rest-client/arc-icons": "^3.0.2",
"@advanced-rest-client/arc-info-messages": "^3.0.0",
"@advanced-rest-client/arc-onboarding": "^3.0.1",
"@advanced-rest-client/eslint-config": "^1.1.3",
"@advanced-rest-client/exchange-search-panel": "^3.0.3",
"@advanced-rest-client/host-rules-editor": "^3.0.0",
"@advanced-rest-client/themes-panel": "^3.0.0",
"@advanced-rest-client/arc-onboarding": "^3.0.1",
"@advanced-rest-client/rest-apis-list-panel": "^3.0.0",
"@advanced-rest-client/themes-panel": "^3.0.0",
"@api-components/api-candidates-dialog": "^3.0.0",
"@api-components/api-documentation": "^3.0.1",
"@api-components/api-navigation": "^3.1.1",
Expand All @@ -57,6 +57,7 @@
"electron": "^6.0.10",
"electron-builder": "^21.2.0",
"electron-mocha": "^8.1.2",
"electron-rebuild": "^1.8.6",
"eslint-config-google": "^0.14.0",
"glob": "^7.1.4",
"lit-element": "^2.2.1",
Expand Down Expand Up @@ -102,11 +103,12 @@
"generateUpdatesFilesForAllChannels": true,
"forceCodeSigning": true,
"detectUpdateChannel": true,
"npmRebuild": true,
"buildDependenciesFromSource": true,
"files": [
"app.html",
"app.js",
"main.js",
"task-manager.html",
"package.json",
"assets/",
"web_modules/",
Expand Down
2 changes: 1 addition & 1 deletion publish.sh
Expand Up @@ -6,4 +6,4 @@ if [ -z "$GH_TOKEN" ]; then
fi

# This will build, package and upload the app to GitHub.
node_modules/.bin/build --win --mac --linux -p always
node_modules/.bin/electron-builder --win --mac --linux --publish always
14 changes: 14 additions & 0 deletions tasks/arc-publish.sh
@@ -0,0 +1,14 @@
if [ $TRAVIS_BRANCH != 'develop' ]; then
exit 0
fi
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "./node_modules/.bin/electron-builder --linux --win"
else
/bin/bash -c "./node_modules/.bin/electron-builder --mac"
fi

0 comments on commit 1195d12

Please sign in to comment.