From d5fed79e865e8aa5c437d66a6c83a457c3ad2788 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.org>
Date: Tue, 27 Oct 2015 12:22:40 -0400
Subject: [PATCH] update to caching mechanism pt 2

---
 bin/compile | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/bin/compile b/bin/compile
index a62aa1be..58a4ffdb 100755
--- a/bin/compile
+++ b/bin/compile
@@ -215,8 +215,18 @@ bpwatch stop post_compile
 # Store new artifacts in cache.
 bpwatch start dump_cache
 
-  rm -rf $CACHE_DIR/$CACHED_DIR
-  cp -R $CACHED_DIR $CACHE_DIR/
+  rm -rf $CACHE_DIR/.heroku/python
+  rm -rf $CACHE_DIR/.heroku/python-version
+  rm -rf $CACHE_DIR/.heroku/python-stack
+  rm -rf $CACHE_DIR/.heroku/vendor
+  rm -rf $CACHE_DIR/.heroku/venv
+
+  mkdir -p $CACHE_DIR/.heroku
+  cp -R .heroku/python $CACHE_DIR/.heroku
+  cp -R .heroku/python-version $CACHE_DIR/.heroku
+  cp -R .heroku/python-stack $CACHE_DIR/.heroku
+  cp -R .heroku/vendor $CACHE_DIR/.heroku &> /dev/null || true
+  cp -R .heroku/venv $CACHE_DIR/.heroku &> /dev/null || true
 
 bpwatch stop dump_cache
 
-- 
GitLab