UltiSnips/scripts/save_docker_cache.sh
Holger Rapp 539c557680
Move travis testing into docker for better consistency. (#950)
This now only tests python2 on Vim 7.4, 8.0 and git. No Neovim (that has been broken for a long time anyways) and no longer any python3 testing. But hey, we have green tests again!
2018-04-01 00:56:34 +02:00

15 lines
532 B
Bash
Executable File

#!/bin/bash
set -o errexit
set -o verbose
set -o pipefail
# Cache intermediate Docker layers. For a description of how this works, see:
# https://giorgos.sealabs.net/docker-cache-on-travis-and-docker-112.html
if [[ ${TRAVIS_BRANCH} == "master" ]] && [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then
mkdir -p $(dirname ${DOCKER_CACHE_FILE})
IMAGE_NAMES=$(docker history -q ultisnips:${TAG} | grep -v '<missing>')
docker save ${IMAGE_NAMES} | gzip > ${DOCKER_CACHE_FILE}.new
mv ${DOCKER_CACHE_FILE}.new ${DOCKER_CACHE_FILE}
fi