ci: add SKIP_COMMIT logic to update-demo script

Make it testable locally.
This commit is contained in:
Nico Rehwaldt 2021-09-16 10:20:55 +02:00 committed by MaxTru
parent 05266d997b
commit 7c8e6a3bc2
1 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# bumps bpmn-js and diagram-js dependencies in bpmn-io-demo # bumps bpmn-js and diagram-js dependencies in bpmn-io-demo
PWD="$(pwd)" PWD="$(pwd)"
@ -15,14 +16,19 @@ cd "$CLONE_DIR"
npm install --save bpmn-js@latest diagram-js@latest npm install --save bpmn-js@latest diagram-js@latest
if [[ "x$SKIP_COMMIT" = "x" ]]; then
git config user.email "$BPMN_IO_EMAIL" git config user.email "$BPMN_IO_EMAIL"
git config user.name "$BPMN_IO_USERNAME" git config user.name "$BPMN_IO_USERNAME"
git config push.default simple git config push.default simple
git add -A git add -A
git commit -m "deps: bump bpmn-js to $TAG" git commit -m "deps: bump to bpmn-js@$TAG"
git tag "bpmn-js-$TAG" git tag "bpmn-js-$TAG"
git push -q &2>/dev/null git push -q &2>/dev/null
git push --tags -q &2>/dev/null git push --tags -q &2>/dev/null
else
echo "Skipping commit (SKIP_COMMIT=$SKIP_COMMIT)"
fi
cd "$PWD" cd "$PWD"