Skip to content

Commit

Permalink
[FLINK-13745][travis] Retain cache of most recent build
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Aug 28, 2019
1 parent 9d03fbd commit b347bad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/travis_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ function deleteOldCaches() {
done
}

# delete leftover caches from previous builds
find "$CACHE_DIR" -mindepth 1 -maxdepth 1 | grep -v "$TRAVIS_BUILD_NUMBER" | deleteOldCaches
# delete leftover caches from previous builds; except the most recent
find "$CACHE_DIR" -mindepth 1 -maxdepth 1 | grep -v "$TRAVIS_BUILD_NUMBER" | sort -Vr | tail -n +2 | deleteOldCaches

STAGE=$1
echo "Current stage: \"$STAGE\""
Expand Down

0 comments on commit b347bad

Please sign in to comment.