Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
c0fbb072
Commit
c0fbb072
authored
Oct 13, 2015
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attempt to whitelist cache entries for python buildpack
parent
6ab397db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
compile
bin/compile
+8
-7
No files found.
bin/compile
View file @
c0fbb072
...
...
@@ -6,6 +6,7 @@
# Fail fast and fail hard.
set
-eo
pipefail
shopt
-s
extglob
[
"
$BUILDPACK_XTRACE
"
]
&&
set
-o
xtrace
...
...
@@ -20,7 +21,7 @@ CACHE_DIR=$2
ENV_DIR
=
$3
CACHED_DIR
S
=
".heroku"
CACHED_DIR
=
".heroku"
WHITELISTED_CACHE_ENTRIES
=
"python|python-stack|python-version|venv|vendor"
# Static configurations for virtualenv caches.
...
...
@@ -144,12 +145,14 @@ bpwatch start clear_old_venvs
[
-d
$CACHE_DIR
/
$VIRTUALENV_LOC
]
&&
rm
-fr
$CACHE_DIR
/.heroku/venv
$CACHE_DIR
/.heroku/src
bpwatch stop clear_old_venvs
cd
$CACHE_DIR
rm
!(
$WHITELISTED_CACHE_ENTRIES
)
cd
$BUILD_DIR
# Restore old artifacts from the cache.
bpwatch start restore_cache
for
dir
in
$CACHED_DIRS
;
do
cp
-R
$CACHE_DIR
/
$dir
.
&> /dev/null
||
true
done
ls
-1
|
grep
-E
-v
"
$WHITELISTED_CACHE_ENTRIES
"
| xargs
rm
-f
cp
-R
$CACHE_DIR
/
$CACHED_DIR
.
&> /dev/null
||
true
bpwatch stop restore_cache
set
+e
...
...
@@ -211,10 +214,8 @@ bpwatch stop post_compile
# Store new artifacts in cache.
bpwatch start dump_cache
for
dir
in
$CACHED_DIRS
;
do
rm
-rf
$CACHE_DIR
/
$dir
cp
-R
$dir
$CACHE_DIR
/
done
bpwatch stop dump_cache
# ### Fin.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment