Sha256: 6beba115aaacfe0f07e3c4f9659b6effd7488722a8087aeca67e3692aff0e267

Contents?: true

Size: 963 Bytes

Versions: 5

Compression:

Stored size: 963 Bytes

Contents

#!/bin/bash

bin/build-jq.sh

pr_files_json=`curl -s https://api.github.com/repos/exercism/java/pulls/${TRAVIS_PULL_REQUEST}/files`

# if jq fails to get the required data, then that means TRAVIS_PULL_REQUEST was not set (not run in travis-ci),
# or was false (not a pull request). In that case, we should fall back with testing every exercise

modded_files=`echo $pr_files_json | bin/jq -r '.[].filename'` || bin/journey-test.sh

for file in $modded_files
  do if [[ $file == exercises* ]] || [[ $file == config.json ]]
    then
    for file2 in $modded_files
      do if [[ $file2 == exercises* ]]
        then modded_exercise=${file2#exercises/}
        modded_exercise=${modded_exercise%%/*}
        if [[ $last_modded_exercise != $modded_exercise ]]
          then modded_exercises=$modded_exercises$modded_exercise$'\n'
        fi
        last_modded_exercise=$modded_exercise
      fi
    done
    bin/journey-test.sh $modded_exercises
    break
  fi
done

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trackler-2.2.1.18 tracks/java/bin/run-journey-test-from-ci.sh
trackler-2.2.1.17 tracks/java/bin/run-journey-test-from-ci.sh
trackler-2.2.1.16 tracks/java/bin/run-journey-test-from-ci.sh
trackler-2.2.1.15 tracks/java/bin/run-journey-test-from-ci.sh
trackler-2.2.1.14 tracks/java/bin/run-journey-test-from-ci.sh