From 7c8e6a3bc25a2c528c64473f12c0b61248ec2f0e Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 16 Sep 2021 10:20:55 +0200 Subject: [PATCH] ci: add SKIP_COMMIT logic to update-demo script Make it testable locally. --- tasks/stages/update-demo | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tasks/stages/update-demo b/tasks/stages/update-demo index 7b003ee0..65962859 100755 --- a/tasks/stages/update-demo +++ b/tasks/stages/update-demo @@ -1,4 +1,5 @@ -#! /bin/bash +#!/bin/bash + # bumps bpmn-js and diagram-js dependencies in bpmn-io-demo @@ -15,14 +16,19 @@ cd "$CLONE_DIR" npm install --save bpmn-js@latest diagram-js@latest -git config user.email "$BPMN_IO_EMAIL" -git config user.name "$BPMN_IO_USERNAME" -git config push.default simple +if [[ "x$SKIP_COMMIT" = "x" ]]; then -git add -A -git commit -m "deps: bump bpmn-js to $TAG" -git tag "bpmn-js-$TAG" -git push -q &2>/dev/null -git push --tags -q &2>/dev/null + 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 "deps: bump to bpmn-js@$TAG" + git tag "bpmn-js-$TAG" + git push -q &2>/dev/null + git push --tags -q &2>/dev/null +else + echo "Skipping commit (SKIP_COMMIT=$SKIP_COMMIT)" +fi cd "$PWD" \ No newline at end of file