2021-01-22 13:21:37 +00:00
|
|
|
#!/bin/bash
|
2020-01-22 14:41:31 +00:00
|
|
|
|
|
|
|
# update bpmn-js version in the <bpmn.io> project
|
|
|
|
|
|
|
|
PWD="$(pwd)"
|
|
|
|
WORKDIR="$(pwd)/tmp"
|
|
|
|
CLONE_DIR="$WORKDIR/bpmn.io"
|
|
|
|
|
|
|
|
# create work dir
|
|
|
|
mkdir -p "$WORKDIR"
|
|
|
|
|
2021-04-30 16:07:17 +00:00
|
|
|
git clone --depth=1 "https://$GH_AUTH@github.com/bpmn-io/bpmn.io.git" "$CLONE_DIR"
|
2020-01-22 14:41:31 +00:00
|
|
|
|
|
|
|
cd "$CLONE_DIR"
|
|
|
|
|
2021-04-30 16:07:17 +00:00
|
|
|
echo "Updating toolkit version to $TAG on bpmn.io"
|
2020-01-22 14:41:31 +00:00
|
|
|
|
2021-04-30 16:07:17 +00:00
|
|
|
cat src/data/site.yml | tr "\r?\n" "\r" | sed -e "s#bpmnjs:\r version: [^\r]*\r#bpmnjs:\r version: $TAG\r#" | tr "\r" "\n" > src/data/site.yml_new
|
2020-02-04 08:48:53 +00:00
|
|
|
mv -f src/data/site.yml_new src/data/site.yml
|
2020-01-22 14:41:31 +00:00
|
|
|
|
|
|
|
if [[ "x$SKIP_COMMIT" = "x" ]]; then
|
|
|
|
|
|
|
|
git config user.email "$BPMN_IO_EMAIL"
|
|
|
|
git config user.name "$BPMN_IO_USERNAME"
|
|
|
|
git config push.default simple
|
|
|
|
|
|
|
|
# add all resources
|
|
|
|
git add -A
|
2021-05-04 16:47:00 +00:00
|
|
|
git commit -m "deps: bump bpmn-js to $TAG"
|
2020-02-04 08:30:43 +00:00
|
|
|
git push -q &2>/dev/null
|
2020-01-22 14:41:31 +00:00
|
|
|
else
|
|
|
|
echo "Skipping commit (SKIP_COMMIT=$SKIP_COMMIT)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$PWD"
|