From d2c5a1dde91d10b4f3f9f5ac0b1570527247e03c Mon Sep 17 00:00:00 2001 From: "Stefan K. Berg" Date: Sat, 23 Jan 2016 20:56:48 +0100 Subject: Cache as we go instead of in the end In order to speed up the build process when building with the cache enabled, cache immediately following the build of a sub artifact instead of at the end. Should the build fail, we don't need to rebuild those parts that already were successful in the last build. Change-Id: I23b59f7ba4a04272aea855cf451793158fe12241 Signed-off-by: Stefan K. Berg --- build/cache.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build/cache.sh') diff --git a/build/cache.sh b/build/cache.sh index 52d28fa33..b5f090210 100755 --- a/build/cache.sh +++ b/build/cache.sh @@ -19,7 +19,6 @@ exit_trap() { trap exit_trap EXIT CACHETRANSPORT=${CACHETRANSPORT:-"curl --silent"} -CACHEBASE=${CACHEBASE:-"file://${HOME}/cache"} CACHEMAXAGE=${CACHEMAXAGE:-$[14*24*3600]} CACHEDEBUG=${CACHEDEBUG:-1} @@ -139,6 +138,12 @@ getcommitid() { fi } + + +if [ -z "$CACHEBASE" ]; then + errorexit "CACHEBASE not set - exiting..." +fi + case $1 in getbiweek) if [ $# -ne 1 ]; then -- cgit 1.2.3-korg