2017-11-15 07:46:18 +00:00
|
|
|
#! /bin/bash
|
2017-10-27 10:00:04 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2017-11-06 22:29:49 +00:00
|
|
|
# update bower.json
|
|
|
|
BOWER_VERSION="${TRAVIS_TAG:1}"
|
2017-11-15 07:46:18 +00:00
|
|
|
echo "Updating bower.json version to $BOWER_VERSION"
|
2017-11-06 22:29:49 +00:00
|
|
|
|
|
|
|
sed -i -E "s/(\"version\": )\"[^\"]+\"/\1\"$BOWER_VERSION\"/" bower.json
|
|
|
|
|
|
|
|
# add all resources
|
2017-10-27 10:00:04 +00:00
|
|
|
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"
|