Commit 12c9b8b2 authored by Peter Parente's avatar Peter Parente

Fix diff comparison for master merge

Need to check file changes in TRAVIS_COMMIT_RANGE
parent 9f7046ab
......@@ -21,7 +21,7 @@ jobs:
- pip install --upgrade pip
- make dev-env
script:
- if [ $(make n-docs-diff) -ne 0 ]; then make tx-en; fi;
- if [ $(make n-docs-diff DIFF_RANGE=$TRAVIS_COMMIT_RANGE) -ne 0 ]; then make tx-en; fi;
stages:
- name: test-pr
......
......@@ -6,6 +6,7 @@
SHELL:=bash
OWNER:=jupyter
ARCH:=$(shell uname -m)
DIFF_RANGE?=master...HEAD
# Need to list the images in build dependency order
ifeq ($(ARCH),ppc64le)
......@@ -61,10 +62,11 @@ docs: ## build HTML documentation
make -C docs html
n-docs-diff: ## number of docs/ files changed since branch from master
@git diff --name-only master...HEAD -- docs/ | wc -l | awk '{print $$1}'
@git diff --name-only $(DIFF_RANGE) -- docs/ | wc -l | awk '{print $$1}'
n-other-diff: ## number of files outside docs/ changed since branch from master
@git diff --name-only master...HEAD -- ':!docs/' | wc -l | awk '{print $$1}'
@git diff --name-only $(DIFF_RANGE) -- ':!docs/' | wc -l | awk '{print $$1}'
tx-en: ## rebuild en locale strings and push to master
git config --global user.email "travis@travis-ci.org"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment