Fix line break and variable expansion in CHANGED variable (#1629)

* Fix line break in CHANGED variable

* Fix CHANGED expansion
This commit is contained in:
ylemkimon
2018-08-18 08:58:57 +09:00
committed by Kevin Barabash
parent 0687dd431a
commit 1eecf2d5a5

View File

@@ -13,8 +13,8 @@ post_checkout: &post_checkout
fi
if [[ $BASE_COMMIT ]]; then
CHANGED=$(git diff --name-only $BASE_COMMIT)
echo $CHANGED
echo 'export CHANGED="$CHANGED"' >> $BASH_ENV
echo "$CHANGED"
echo "export CHANGED=\"$CHANGED\"" >> $BASH_ENV
fi
node_modules_cache_key: &node_modules_cache_key
@@ -39,7 +39,7 @@ screenshotter: &screenshotter
name: Skip screenshotter if no KaTeX code has been changed
command: |
if [[ $CHANGED ]]; then
echo $CHANGED | grep -qvE '^contrib/|^docs/|^static/|^website/|^LICENSE|\.md$' || circleci step halt
echo "$CHANGED" | grep -qvE '^contrib/|^docs/|^static/|^website/|^LICENSE|\.md$' || circleci step halt
fi
- *restore_node_modules_cache
@@ -76,7 +76,7 @@ jobs:
name: Skip screenshotter if only documentation has been changed
command: |
if [[ $CHANGED ]]; then
echo $CHANGED | grep -qvE '^docs/|^LICENSE|\.md$' || circleci step halt
echo "$CHANGED" | grep -qvE '^docs/|^LICENSE|\.md$' || circleci step halt
fi
- *restore_node_modules_cache