Skip to content

Commit db89a34

Browse files
committed
Fix CI diff checks
1 parent a6fbfb4 commit db89a34

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

scripts/ci

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,12 @@ git checkout -- src/pages/postgraphile/usage-*.md
1818
if [ "$GITHUB_TOKEN" != "" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "develop" ]; then
1919
echo "GITHUB_TOKEN is specified"
2020

21-
if ! git diff-index --exit-code --name-only HEAD --; then
21+
# git diff-index only looks at modified timestamps; this 'git status' call
22+
# forces git to recognise that certain files are unmodified.
23+
git status
24+
if ! git diff-index --exit-code --name-status HEAD --; then
2225
echo "But first; there were changes so lets try and push those back to 'develop'"
23-
set -x
24-
# Checkout new branch so we're not in 'detatched head' mode
25-
git checkout -b ci/$(date +"%Y%m%d_%H%M%S")
26-
git status
27-
2826
git add -u
29-
30-
git status
31-
32-
# Workaround issue on Travis CI
33-
git add .cachedValidUrls.json
34-
35-
git status
36-
3727
git commit -m"Fixes from CI"
3828

3929
# I really hope this doesn't cause an infinite CI loop

0 commit comments

Comments
 (0)