summaryrefslogtreecommitdiffstats
path: root/build/cache.sh
diff options
context:
space:
mode:
authorStefan K. Berg <stefan.k.berg@ericsson.com>2016-01-23 20:56:48 +0100
committerStefan Berg <sfb@consultron.com>2016-01-29 14:25:47 +0100
commit36895dd570e1c602ea3171fa4c8bb77b19bc91d4 (patch)
treed18e310cec7849e03069c9de99d26f64447587fc /build/cache.sh
parent19f52239658b8e8b905acf4e8613db51f8d03e02 (diff)
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 <stefan.k.berg@ericsson.com> (cherry picked from commit d2c5a1dde91d10b4f3f9f5ac0b1570527247e03c)
Diffstat (limited to 'build/cache.sh')
-rwxr-xr-xbuild/cache.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/build/cache.sh b/build/cache.sh
index 07361d28a..7c2f2109c 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}
@@ -132,6 +131,12 @@ getcommitid() {
fi
}
+
+
+if [ -z "$CACHEBASE" ]; then
+ errorexit "CACHEBASE not set - exiting..."
+fi
+
case $1 in
getcommitid)
if [ $# -ne 3 ]; then