diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2019-01-14 11:08:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 11:08:11 +0100 |
commit | 36c362c4e936d5e6aa9a0458a2b318834f6e3c05 (patch) | |
tree | 0640defd828778d5aa25dfc3919c04e30a0be9df | |
parent | 914a3a48a5ee71a6b5cd007a86dda6bf2a8602d1 (diff) |
nightly build only when sth changed (#5168)
-rwxr-xr-x | .travis/nightlies.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/.travis/nightlies.sh b/.travis/nightlies.sh index ac00d1e1a7..88239793a6 100755 --- a/.travis/nightlies.sh +++ b/.travis/nightlies.sh @@ -16,6 +16,10 @@ git config user.name "${GIT_USER}" echo "--- UPDATE VERSION FILE ---" LAST_TAG=$(git describe --abbrev=0 --tags) NO_COMMITS=$(git rev-list "$LAST_TAG"..HEAD --count) +if [ "$NO_COMMITS" == "$(rev <packaging/version | cut -d- -f 2 | rev)" ]; then + echo "Nothing changed since last nightly build" + exit 0 +fi echo "$LAST_TAG-$((NO_COMMITS + 1))-nightly" >packaging/version git add packaging/version |