Fix tmpcommit-detection script for travis

This commit is contained in:
Matthias Beyer 2018-04-23 14:20:35 +02:00
parent 7d3224a258
commit 7e078108ba
1 changed files with 7 additions and 11 deletions

View File

@ -1,16 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
COMMIT_RANGE="" # Because travis _SUCKS_ really hard, we cannot find the "master" commit or any
# commit where the current branch is derived from (if this is not master).
if [[ $TRAVIS ]]; then # So we simply use HEAD~49..HEAD as the range to check. This might break some
if [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then # day, I don't know.
COMMIT_RANGE=HEAD^..HEAD # But as travis only clones 50 commits and does not provide ANY usable
else # information about the commits, this is the only thing we can do.
COMMIT_RANGE=$TRAVIS_COMMIT_RANGE COMMIT_RANGE="HEAD~49..HEAD"
fi
else
COMMIT_RANGE=$(git merge-base master HEAD)..HEAD
fi
logfreeof() { logfreeof() {
git log --format="%s" $COMMIT_RANGE |\ git log --format="%s" $COMMIT_RANGE |\