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
25a2e022
Commit
25a2e022
authored
Dec 11, 2014
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename BUILD_CLEAN to DISABLE_BUILD_CACHE for clarity
parent
173425a3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
README.md
README.md
+3
-3
compile
bin/compile
+3
-3
test
bin/test
+5
-5
README.md
test/disable-build-cache-1/README.md
+0
-0
package.json
test/disable-build-cache-1/package.json
+0
-0
README.md
test/disable-build-cache-2/README.md
+0
-0
package.json
test/disable-build-cache-2/package.json
+0
-0
No files found.
README.md
View file @
25a2e022
...
@@ -75,13 +75,13 @@ as long as they fall within acceptable semver ranges,
...
@@ -75,13 +75,13 @@ as long as they fall within acceptable semver ranges,
which can lead to outdated modules.
which can lead to outdated modules.
```
shell
```
shell
heroku config:set
BUILD_CLEAN
=
true
heroku config:set
DISABLE_BUILD_CACHE
=
true
git commit
-am
'build'
--allow-empty
git commit
-am
'build'
--allow-empty
git push heroku master
git push heroku master
heroku config:unset
BUILD_CLEAN
heroku config:unset
DISABLE_BUILD_CACHE
```
```
Default:
`
BUILD_CLEAN
`
defaults to false
Default:
`
DISABLE_BUILD_CACHE
`
defaults to false
### Enable or disable devDependencies installation
### Enable or disable devDependencies installation
...
...
bin/compile
View file @
25a2e022
...
@@ -33,7 +33,7 @@ trap build_failed ERR
...
@@ -33,7 +33,7 @@ trap build_failed ERR
# Load config vars into environment; start with defaults
# Load config vars into environment; start with defaults
export
NPM_CONFIG_PRODUCTION
=
true
export
NPM_CONFIG_PRODUCTION
=
true
export
BUILD_CLEAN
=
false
export
DISABLE_BUILD_CACHE
=
false
if
[
-d
"
$env_dir
"
]
;
then
if
[
-d
"
$env_dir
"
]
;
then
export_env_dir
$env_dir
export_env_dir
$env_dir
...
@@ -81,7 +81,7 @@ info "node_modules cached: $modules_cached"
...
@@ -81,7 +81,7 @@ info "node_modules cached: $modules_cached"
echo
""
echo
""
info
"NPM_CONFIG_PRODUCTION=
$NPM_CONFIG_PRODUCTION
"
info
"NPM_CONFIG_PRODUCTION=
$NPM_CONFIG_PRODUCTION
"
info
"
BUILD_CLEAN=
$BUILD_CLEAN
"
info
"
DISABLE_BUILD_CACHE=
$DISABLE_BUILD_CACHE
"
source
$bp_dir
/bin/warnings.sh
source
$bp_dir
/bin/warnings.sh
...
@@ -145,7 +145,7 @@ elif [ $modules_source == "prebuilt" ]; then
...
@@ -145,7 +145,7 @@ elif [ $modules_source == "prebuilt" ]; then
info
"Rebuilding any native modules for this architecture"
info
"Rebuilding any native modules for this architecture"
npm rebuild 2>&1
npm rebuild 2>&1
elif
!
$
BUILD_CLEAN
&&
!
$cache_busted
;
then
elif
!
$
DISABLE_BUILD_CACHE
&&
!
$cache_busted
;
then
info
"Restoring node modules from cache"
info
"Restoring node modules from cache"
cp
-r
$cache_dir
/node/node_modules
$build_dir
/
cp
-r
$cache_dir
/node/node_modules
$build_dir
/
info
"Pruning unused dependencies"
info
"Pruning unused dependencies"
...
...
bin/test
View file @
25a2e022
...
@@ -178,20 +178,20 @@ testDevDependencies() {
...
@@ -178,20 +178,20 @@ testDevDependencies() {
assertCapturedSuccess
assertCapturedSuccess
}
}
test
BuildClean
()
{
test
DisableCache
()
{
cache
=
$(
mktmpdir
)
cache
=
$(
mktmpdir
)
env_dir
=
$(
mktmpdir
)
env_dir
=
$(
mktmpdir
)
compile
"
build-clean
-1"
$cache
compile
"
disable-build-cache
-1"
$cache
assertCaptured
"lodash@1.0.0"
assertCaptured
"lodash@1.0.0"
assertCapturedSuccess
assertCapturedSuccess
compile
"
build-clean
-2"
$cache
compile
"
disable-build-cache
-2"
$cache
assertCaptured
"lodash@1.0.0"
assertCaptured
"lodash@1.0.0"
assertCapturedSuccess
assertCapturedSuccess
echo
"true"
>
$env_dir
/
BUILD_CLEAN
echo
"true"
>
$env_dir
/
DISABLE_BUILD_CACHE
compile
"
build-clean
-2"
$cache
$env_dir
compile
"
disable-build-cache
-2"
$cache
$env_dir
assertCaptured
"lodash@1.3.1"
assertCaptured
"lodash@1.3.1"
assertCapturedSuccess
assertCapturedSuccess
}
}
...
...
test/
build-clean
-1/README.md
→
test/
disable-build-cache
-1/README.md
View file @
25a2e022
File moved
test/
build-clean
-1/package.json
→
test/
disable-build-cache
-1/package.json
View file @
25a2e022
File moved
test/
build-clean
-2/README.md
→
test/
disable-build-cache
-2/README.md
View file @
25a2e022
File moved
test/
build-clean
-2/package.json
→
test/
disable-build-cache
-2/package.json
View file @
25a2e022
File moved
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