summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-02-26 11:06:09 -0800
committerGitHub <noreply@github.com>2021-02-26 19:06:09 +0000
commit7bef936f181b9419640d6a68e2869808c21eda3e (patch)
tree1a49aeeee5ac37ead8ab41464fbbf2423a9dd513
parentcafe85d6d8d5a7497ebf40b8474052be0885e58f (diff)
downloadbinaryen-7bef936f181b9419640d6a68e2869808c21eda3e.tar.gz
binaryen-7bef936f181b9419640d6a68e2869808c21eda3e.tar.bz2
binaryen-7bef936f181b9419640d6a68e2869808c21eda3e.zip
Update clang-tidy-diff.sh for GH Actions (#3619)
-rwxr-xr-xscripts/clang-tidy-diff.sh13
1 files changed, 3 insertions, 10 deletions
diff --git a/scripts/clang-tidy-diff.sh b/scripts/clang-tidy-diff.sh
index fbfa7350d..1bed470cd 100755
--- a/scripts/clang-tidy-diff.sh
+++ b/scripts/clang-tidy-diff.sh
@@ -2,17 +2,10 @@
set -o errexit
-# When we are running on travis and *not* part of a pull request we don't
-# have any upstream branch to compare against.
-if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
- echo "Skipping since not running on travis PR"
- exit 0
-fi
-
-if [ -n "$TRAVIS_BRANCH" ]; then
- BRANCH=$TRAVIS_BRANCH
+if [ -n "$GITHUB_BASE_REF" ]; then
+ BRANCH="origin/$GITHUB_BASE_REF"
else
- BRANCH=origin/main
+ BRANCH="@{upstream}"
fi
CLANG_TIDY=$(which clang-tidy)