Kaynağa Gözat

Remove use of "TRAVIS_COMMIT_RANGE" variable

Tianon Gravi 6 yıl önce
ebeveyn
işleme
a8b54bda6e
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      .travis/check-pr-no-readme.sh

+ 2 - 1
.travis/check-pr-no-readme.sh

@@ -4,7 +4,8 @@ set -Eeuo pipefail
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
 
 if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
-	if [ "$(git diff --numstat "$TRAVIS_COMMIT_RANGE" -- '*/README.md')" ]; then
+	git fetch -q https://github.com/docker-library/docs.git master
+	if [ -n "$(git diff --numstat FETCH_HEAD...HEAD -- '*/README.md')" ]; then
 		echo >&2 'Error: at least one repo README.md has changed'
 		echo >&2 'These files are autogenerated, so it is unnecessary to modify them'
 		echo >&2 'Please update content.md and docker-library-bot will take care of README.md'