From 38d73effc1acf32c7f200142ea017d3ef2c665b6 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.org>
Date: Tue, 13 Oct 2015 09:47:14 -0400
Subject: [PATCH] an attempt at fixing caching

---
 bin/compile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/compile b/bin/compile
index d81772ea..20c32898 100755
--- a/bin/compile
+++ b/bin/compile
@@ -20,7 +20,8 @@ CACHE_DIR=$2
 ENV_DIR=$3
 
 
-CACHED_DIRS=".heroku"
+CACHED_DIR=".heroku"
+CACHED_DIRS=".heroku/python .heroku/python-stack .heroku/python-version .heroku/vendor .heroku/venv"
 
 # Static configurations for virtualenv caches.
 VIRTUALENV_LOC=".heroku/venv"
@@ -145,6 +146,7 @@ bpwatch stop clear_old_venvs
 
 # Restore old artifacts from the cache.
 bpwatch start restore_cache
+  mkdir -p $CACHEDIR/$CACHED_DIR
   for dir in $CACHED_DIRS; do
     cp -R $CACHE_DIR/$dir . &> /dev/null || true
   done
@@ -209,6 +211,7 @@ bpwatch stop post_compile
 
 # Store new artifacts in cache.
 bpwatch start dump_cache
+  mkdir -p $CACHE_DIR/$CACHED_DIR
   for dir in $CACHED_DIRS; do
     rm -rf $CACHE_DIR/$dir
     cp -R $dir $CACHE_DIR/
-- 
GitLab