mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Use base revision provided by CircleCI (#2309)
instead of GitHub API Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
@@ -19,21 +19,6 @@ commands:
|
|||||||
command: |
|
command: |
|
||||||
git submodule sync
|
git submodule sync
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
- run:
|
|
||||||
name: Get changed files
|
|
||||||
command: |
|
|
||||||
if [[ $CIRCLE_PULL_REQUEST ]]; then
|
|
||||||
BASE_COMMIT=$(curl -s -H "Authorization: token a61ecb2fc5b72da54431""1b3db3875c96854958a8" \
|
|
||||||
https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER \
|
|
||||||
| jq -r ".base.sha | select(. != null)")...
|
|
||||||
else
|
|
||||||
BASE_COMMIT=HEAD^
|
|
||||||
fi
|
|
||||||
if [[ $BASE_COMMIT ]]; then
|
|
||||||
CHANGED=$(git diff --name-only $BASE_COMMIT)
|
|
||||||
echo "$CHANGED"
|
|
||||||
echo "export CHANGED=\"$CHANGED\"" >> $BASH_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
skip_if_only_changed:
|
skip_if_only_changed:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -42,7 +27,7 @@ commands:
|
|||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Skip tests if only "<< parameters.filter >>" are changed
|
name: Skip tests if only "<< parameters.filter >>" are changed
|
||||||
command: echo "$CHANGED" | grep -qvE '<< parameters.filter >>' || circleci step halt
|
command: git diff --name-only << pipeline.git.base_revision >>... | grep -qvE '<< parameters.filter >>' || circleci step halt
|
||||||
|
|
||||||
install_dependencies:
|
install_dependencies:
|
||||||
steps:
|
steps:
|
||||||
|
Reference in New Issue
Block a user