Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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-nodejs
Commits
f1b19542
Commit
f1b19542
authored
Jun 22, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #238 from heroku/fix-prebuild-should-skip-prune
Fix prebuild should skip prune
parents
2e2f28b7
f214931f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
cache.sh
lib/cache.sh
+2
-2
dependencies.sh
lib/dependencies.sh
+0
-2
run
test/run
+15
-14
No files found.
lib/cache.sh
View file @
f1b19542
...
...
@@ -75,8 +75,8 @@ save_cache_directories() {
for
cachepath
in
${
@
:3
}
;
do
if
[
-e
"
$build_dir
/
$cachepath
"
]
;
then
echo
"-
$cachepath
"
mkdir
-p
$(
dirname
"
$cache_dir
/node/
$cachepath
"
)
ln
-s
"
$build_dir
/
$cachepath
"
"
$cache_dir
/node/
$cachepath
"
mkdir
-p
"
$cache_dir
/node/
$cachepath
"
cp
-a
"
$build_dir
/
$cachepath
"
$(
dirname
"
$cache_dir
/node/
$cachepath
"
)
else
echo
"-
$cachepath
(nothing to cache)"
fi
...
...
lib/dependencies.sh
View file @
f1b19542
...
...
@@ -21,8 +21,6 @@ rebuild_node_modules() {
if
[
-e
$build_dir
/package.json
]
;
then
cd
$build_dir
echo
"Pruning any extraneous modules"
npm prune
--unsafe-perm
--userconfig
$build_dir
/.npmrc 2>&1
echo
"Rebuilding any native modules"
npm rebuild 2>&1
if
[
-e
$build_dir
/npm-shrinkwrap.json
]
;
then
...
...
test/run
View file @
f1b19542
#!/usr/bin/env bash
# See README.md for info on running these tests.
testModulesCheckedIn
()
{
cache
=
$(
mktmpdir
)
compile
"modules-checked-in"
$cache
assertCapturedSuccess
compile
"modules-checked-in"
$cache
assertCaptured
"Prebuild detected"
assertCaptured
"Rebuilding any native modules"
assertCaptured
"(preinstall script)"
assertCaptured
"Installing any new modules"
assertCaptured
"(postinstall script)"
assertNotCaptured
"Pruning any extraneous modules"
assertCapturedSuccess
}
testDisableCache
()
{
cache
=
$(
mktmpdir
)
env_dir
=
$(
mktmpdir
)
...
...
@@ -235,20 +250,6 @@ testBuildWithUserCacheDirectoriesCamel() {
assertCapturedSuccess
}
testModulesCheckedIn
()
{
cache
=
$(
mktmpdir
)
compile
"modules-checked-in"
$cache
assertCapturedSuccess
compile
"modules-checked-in"
$cache
assertCaptured
"Prebuild detected"
assertCaptured
"Rebuilding any native modules"
assertCaptured
"(preinstall script)"
assertCaptured
"Installing any new modules"
assertCaptured
"(postinstall script)"
assertCapturedSuccess
}
testUserConfig
()
{
compile
"userconfig"
assertCaptured
"www.google.com"
...
...
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