chore(project): add release build stages

* configure build stages on release tags

  + publish bpmn-io/bower-bpmn-js
  + update bpmn-io/bpmn-js-seed
  + update bpmn-io/bpmn-js-integration
This commit is contained in:
Nico Rehwaldt 2017-10-27 12:00:04 +02:00 committed by Nico Rehwaldt
parent 1926ce4494
commit 1dc84c500f
5 changed files with 120 additions and 14 deletions

View File

@ -1,19 +1,38 @@
language: node_js
node_js: 'node'
node_js:
- 'node'
before_install:
- npm install -g wiredeps@0.2
- wiredeps --default-branch=master --branch=$TRAVIS_BRANCH --tag=$TRAVIS_TAG --verbose
sudo: false
addons:
firefox: "latest-esr"
script: npm test
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
jobs:
include:
- stage: test
addons:
firefox: "latest-esr"
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
script:
- TEST_BROWSERS=Firefox,PhantomJS npm run all
- stage: publish pre-built
script: './tasks/stages/publish-prebuilt'
- stage: update integration test
script: './tasks/stages/update-integration-test'
- stage: update seed
script: './tasks/stages/update-seed'
script:
- TEST_BROWSERS=Firefox,PhantomJS npm run all
before_install:
- npm install -g grunt-cli wiredeps@0.2
- wiredeps --default-branch=master --branch=$TRAVIS_BRANCH --tag=$TRAVIS_TAG --verbose
stages:
- test
- name: publish pre-built
if: tag =~ ^v\d
- name: update integration test
if: tag =~ ^v\d
- name: update seed
if: tag =~ ^v\d

View File

@ -13,7 +13,7 @@ module.exports = function(grunt) {
config: {
sources: 'lib',
tests: 'test',
dist: '../bower-bpmn-js/dist'
dist: process.env.BOWER_DIST || '../bower-bpmn-js/dist'
},
eslint: {

29
tasks/stages/publish-prebuilt Executable file
View File

@ -0,0 +1,29 @@
#! /bin/sh
# publishes the bower-bpmn-js prebuilt bundle
PWD="$(pwd)"
WORKDIR="$(pwd)/tmp"
BOWER_DIR="$WORKDIR/bower-bpmn-js"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 https://github.com/bpmn-io/bower-bpmn-js.git "$BOWER_DIR"
npm install
BOWER_DIST="$BOWER_DIR/dist" npm run distro
cd "$BOWER_DIR"
git config user.email "$BPMN_IO_EMAIL"
git config user.name "$BPMN_IO_USERNAME"
git config push.default simple
git add -A
git commit -m "chore(project): package $TRAVIS_TAG"
git tag "$TRAVIS_TAG"
git push -q "https://$GITHUB_AUTH@github.com/bpmn-io/bower-bpmn-js.git" &2>/dev/null
git push --tags -q "https://$GITHUB_AUTH@github.com/bpmn-io/bower-bpmn-js.git" &2>/dev/null
cd "$PWD"

View File

@ -0,0 +1,28 @@
#! /bin/sh
# bumps bpmn-js and diagram-js dependencies in bpmn-js-integration
PWD="$(pwd)"
WORKDIR="$(pwd)/tmp"
IT_DIR="$WORKDIR/bpmn-js-integration"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 https://github.com/bpmn-io/bpmn-js-integration.git "$IT_DIR"
cd "$IT_DIR"
npm install --save bpmn-js@latest bpmn-moddle@latest
git config user.email "$BPMN_IO_EMAIL"
git config user.name "$BPMN_IO_USERNAME"
git config push.default simple
git add -A
git commit -m "chore(project): bump bpmn-js to $TRAVIS_TAG"
git tag "$TRAVIS_TAG"
git push -q "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn-js-integration.git" &2>/dev/null
git push --tags -q "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn-js-integration.git" &2>/dev/null
cd "$PWD"

30
tasks/stages/update-seed Executable file
View File

@ -0,0 +1,30 @@
#! /bin/sh
# updates the bpmn-js-seed project with the latest bundle
PWD="$(pwd)"
WORKDIR="$(pwd)/tmp"
SEED_DIR="$WORKDIR/bpmn-js-seed"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 https://github.com/bpmn-io/bpmn-js-seed.git "$SEED_DIR"
npm install -g bower
cd "$SEED_DIR"
bower install "bpmn-js@$TRAVIS_TAG" -f
git config user.email "$BPMN_IO_EMAIL"
git config user.name "$BPMN_IO_USERNAME"
git config push.default simple
git add -A
git commit -m "chore(seed): update to bpmn-js $TRAVIS_TAG"
git tag "$TRAVIS_TAG"
git push -q "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn-js-seed.git" &2>/dev/null
git push --tags -q "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn-js-seed.git" &2>/dev/null
cd "$PWD"