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
d8623ae4
Commit
d8623ae4
authored
Oct 13, 2015
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitelist approach
parent
e6d395fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
compile
bin/compile
+5
-9
No files found.
bin/compile
View file @
d8623ae4
...
@@ -20,8 +20,8 @@ CACHE_DIR=$2
...
@@ -20,8 +20,8 @@ CACHE_DIR=$2
ENV_DIR
=
$3
ENV_DIR
=
$3
CACHED_DIR
=
".heroku"
CACHED_DIR
S
=
".heroku"
CACHED_DIRS
=
".heroku/python .heroku/python-stack .heroku/python-version .heroku/vendor .heroku/venv
"
WHITELISTED_CACHE_ENTRIES
=
"python|python-stack|python-version|venv|vendor
"
# Static configurations for virtualenv caches.
# Static configurations for virtualenv caches.
VIRTUALENV_LOC
=
".heroku/venv"
VIRTUALENV_LOC
=
".heroku/venv"
...
@@ -146,15 +146,12 @@ bpwatch stop clear_old_venvs
...
@@ -146,15 +146,12 @@ bpwatch stop clear_old_venvs
# Restore old artifacts from the cache.
# Restore old artifacts from the cache.
bpwatch start restore_cache
bpwatch start restore_cache
mkdir
-p
$CACHE_DIR
/
$CACHED_DIR
for
dir
in
$CACHED_DIRS
;
do
for
dir
in
$CACHED_DIRS
;
do
echo
"cp -R
$CACHE_DIR
/
$dir
$CACHED_DIR
"
cp
-R
$CACHE_DIR
/
$dir
.
&> /dev/null
||
true
cp
-R
$CACHE_DIR
/
$dir
$CACHED_DIR
&> /dev/null
||
true
done
done
ls
-1
$CACHED_DIRS
|
grep
-E
-v
$WHITELISTED_CACHE_ENTRIES
| xargs
rm
-f
bpwatch stop restore_cache
bpwatch stop restore_cache
ls
/app/.heroku/
set
+e
set
+e
# Create set-aside `.heroku` folder.
# Create set-aside `.heroku` folder.
mkdir
.heroku &> /dev/null
mkdir
.heroku &> /dev/null
...
@@ -214,10 +211,9 @@ bpwatch stop post_compile
...
@@ -214,10 +211,9 @@ bpwatch stop post_compile
# Store new artifacts in cache.
# Store new artifacts in cache.
bpwatch start dump_cache
bpwatch start dump_cache
mkdir
-p
$CACHE_DIR
/
$CACHED_DIR
for
dir
in
$CACHED_DIRS
;
do
for
dir
in
$CACHED_DIRS
;
do
rm
-rf
$CACHE_DIR
/
$dir
rm
-rf
$CACHE_DIR
/
$dir
cp
-R
$dir
$CACHE_DIR
/
2>/dev/null
cp
-R
$dir
$CACHE_DIR
/
done
done
bpwatch stop dump_cache
bpwatch stop dump_cache
...
...
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