Skip to content

Commit

Permalink
chore(project): build distro via Travis
Browse files Browse the repository at this point in the history
* build distributions on Travis CI
* publish to GitHub releases

Related to #787
  • Loading branch information
nikku committed Jun 4, 2018
1 parent d56c253 commit 2dc1ec3
Show file tree
Hide file tree
Showing 11 changed files with 594 additions and 40 deletions.
73 changes: 69 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
language: node_js
node_js: 'node'
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

script:
- npm run all
jobs:
include:
- stage: test
node_js: node
language: node_js
script: "npm run all"
- stage: "distro [windows+linux]"
os: linux
services: docker
language: generic
script:
- |
docker run --rm \
--env-file <(env | grep -E 'DEBUG|NODE_|ELECTRON_|NPM_|CI|TRAVIS|WIN_CSC_|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 "npm i && npm run build -- --win --linux --publish"
- stage: "distro [macos]"
os: osx
osx_image: xcode9
node_js: node
language: node_js
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
script: npm run build -- --mac --publish
- stage: "nightly build [windows+linux]"
os: linux
services: docker
language: generic
script:
- |
docker run --rm \
--env-file <(env | grep -E 'DEBUG|NODE_|ELECTRON_|NPM_|CI|TRAVIS|WIN_CSC_|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 "npm i && npm run build -- --win --linux --nightly --no-publish"
- stage: "nightly build [macos]"
os: osx
osx_image: xcode9
node_js: node
language: node_js
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
script: npm run build -- --mac --nightly --no-publish

before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

stages:
- test
- name: "distro [windows+linux]"
if: tag =~ ^v\d
- name: "distro [macos]"
if: tag =~ ^v\d
- name: "nightly build [windows+linux]"
if: type IN (cron)
- name: "nightly build [macos]"
if: type IN (cron)
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "camunda-modeler",
"version": "1.14.0",
"version": "1.15.1",
"description": "Camunda Modeler for BPMN, DMN and CMMN, based on bpmn.io",
"private": true,
"main": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions client/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ module.exports = function(grunt) {

grunt.registerTask('auto-test', [ 'karma:unit' ]);

grunt.registerTask('build-client', [
grunt.registerTask('build', [
'browserify:client',
'less',
'copy'
]);

grunt.registerTask('default', [
'test',
'build-client'
'build'
]);

grunt.registerTask('auto-build', [
Expand Down
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "camunda-modeler-client",
"version": "1.14.0",
"version": "1.15.1",
"description": "Camunda Modeler client application",
"private": true,
"scripts": {
"test": "cross-env NODE_ENV=test grunt test",
"auto-test": "cross-env NODE_ENV=test grunt auto-test",
"all": "cross-env NODE_ENV=production grunt",
"build": "cross-env NODE_ENV=production grunt build",
"dev": "cross-env NODE_ENV=development grunt auto-build"
},
"dependencies": {
Expand Down
13 changes: 4 additions & 9 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"appId": "com.camunda.CamundaModeler",
"productName": "Camunda Modeler",
"directories": {
"output": "distro"
},
"extraFiles": [
{
"from": "resources/platform/base",
"to": ".",
"filter": [ "**/*" ]
}
],
"files": [
{
"filter": [
Expand All @@ -20,10 +14,11 @@
]
}
],
"afterPack": "./tasks/add-version.js",
"afterPack": "./tasks/copy-assets.js",
"win": {
"target": [
"nsis",
"nsis-web",
"zip"
]
},
Expand Down
Loading

0 comments on commit 2dc1ec3

Please sign in to comment.