Skip to content

Commit

Permalink
Merge pull request #1380 from rouault/fix_verify_indent_pr
Browse files Browse the repository at this point in the history
verify-indentation.sh: fix for pull request from bar/master to foo/master
  • Loading branch information
rouault authored Sep 15, 2021
2 parents fd485f2 + af8ed50 commit ec65174
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Requirements
run: |
sudo apt update
sudo apt install -y gcc g++
sudo apt install -y gcc g++ libtiff-dev libwebp-dev libzstd-dev
- name: Build and run tests
run: |
Expand Down
8 changes: 3 additions & 5 deletions scripts/verify-indentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ ASTYLEDIFF=/tmp/astyle.diff
if [ ! -z $GITHUB_BASE_REF ] && [ ! -z $GITHUB_HEAD_REF ]; then
# on a PR
echo "GitHub PR COMMIT RANGE: ${GITHUB_BASE_REF}..${GITHUB_HEAD_REF}"
git branch ${GITHUB_BASE_REF} origin/${GITHUB_BASE_REF}
git branch ${GITHUB_HEAD_REF} origin/${GITHUB_HEAD_REF}
BASE_SHA1=$(git rev-parse ${GITHUB_BASE_REF})
HEAD_SHA1=$(git rev-parse ${GITHUB_HEAD_REF})
FILES=$(git diff --diff-filter=AMR --name-only ${BASE_SHA1}..${HEAD_SHA1} | tr '\n' ' ' )
git branch tmp_${GITHUB_BASE_REF} origin/${GITHUB_BASE_REF}
BASE_SHA1=$(git rev-parse tmp_${GITHUB_BASE_REF})
FILES=$(git diff --diff-filter=AMR --name-only ${BASE_SHA1}..${GITHUB_SHA} | tr '\n' ' ' )
elif [ ! -z $GITHUB_SHA ]; then
echo "GitHub push COMMIT $GITHUB_SHA"
FILES=$(git diff --diff-filter=AMR --name-only ${GITHUB_SHA}~1..${GITHUB_SHA} | tr '\n' ' ' )
Expand Down

0 comments on commit ec65174

Please sign in to comment.