Hi, if I commit these two files .travis.yml
& samtools/Dockerfile
:
$ git diff --name-only
.travis.yml
samtools/Dockerfile
Then within the travis build only the .travis.yml
is detected from the $TRAVIS_COMMIT_RANGE
$ CHANGED_FILES=($(git diff --name-only $TRAVIS_COMMIT_RANGE))
The command "CHANGED_FILES=($(git diff --name-only $TRAVIS_COMMIT_RANGE))" exited with 0.
$ echo $CHANGED_FILES
.travis.yml
I think this is something to do with the $TRAVIS_COMMIT_RANGE
variable.
Does anyone know what may be causing this and how to solve it?
Any help would be much appreciated, many thanks in advance.
Here is my full .travis.yml
file for reference:
sudo: required
language: python
jdk: openjdk8
services: docker
python: "3.6"
cache: pip
matrix:
fast_finish: true
script:
# get list of changed files
- CHANGED_FILES=($(git diff --name-only $TRAVIS_COMMIT_RANGE))
# save names of any changed folders (docker containers) to file folders.txt
- echo $CHANGED_FILES
- for file in $CHANGED_FILES; do
echo $file;
dir=$(dirname $file);
echo $dir;
[[ "${dir}" != "." ]] && dirname $file >> folders.txt;
done
# for all changed folders (docker containers) in folders.txt pull containers
- "[ ! -f folders.txt ] || while read folder; do
echo $folder;
docker pull lifebitai/${folder};
done <folders.txt"