diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-04-23 14:20:35 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-04-23 14:52:20 +0200 |
commit | 7e078108ba2aa3e7d9dcf1d15496a614aca3dc61 (patch) | |
tree | 9fec2f77b2f4d596bcfd361e5e71982fe4c36935 /scripts | |
parent | 7d3224a258826132d015decee72e2c3dc76c402a (diff) |
Fix tmpcommit-detection script for travis
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/branch-contains-no-tmp-commits | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/scripts/branch-contains-no-tmp-commits b/scripts/branch-contains-no-tmp-commits index 66973306..1a8a3891 100644 --- a/scripts/branch-contains-no-tmp-commits +++ b/scripts/branch-contains-no-tmp-commits @@ -1,16 +1,12 @@ #!/usr/bin/env bash -COMMIT_RANGE="" - -if [[ $TRAVIS ]]; then - if [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then - COMMIT_RANGE=HEAD^..HEAD - else - COMMIT_RANGE=$TRAVIS_COMMIT_RANGE - fi -else - COMMIT_RANGE=$(git merge-base master HEAD)..HEAD -fi +# 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). +# So we simply use HEAD~49..HEAD as the range to check. This might break some +# day, I don't know. +# But as travis only clones 50 commits and does not provide ANY usable +# information about the commits, this is the only thing we can do. +COMMIT_RANGE="HEAD~49..HEAD" logfreeof() { git log --format="%s" $COMMIT_RANGE |\ |