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
225646aa
Commit
225646aa
authored
Dec 10, 2014
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more verbose success output
parent
3717a3e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
common.sh
bin/common.sh
+6
-0
compile
bin/compile
+9
-7
No files found.
bin/common.sh
View file @
225646aa
build_failed
()
{
echo
""
echo
"Build failed."
echo
""
}
error
()
{
error
()
{
echo
" !
$*
"
>
&2
echo
" !
$*
"
>
&2
exit
1
exit
1
...
...
bin/compile
View file @
225646aa
...
@@ -29,6 +29,8 @@ unset GIT_DIR
...
@@ -29,6 +29,8 @@ unset GIT_DIR
mkdir
-p
$heroku_dir
/node
mkdir
-p
$heroku_dir
/node
echo
""
>
$logfile
echo
""
>
$logfile
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
BUILD_CLEAN
=
false
...
@@ -110,7 +112,7 @@ if [ "$npm_engine" != "" ]; then
...
@@ -110,7 +112,7 @@ if [ "$npm_engine" != "" ]; then
npm_engine
=
$(
curl
--silent
--get
--data-urlencode
"range=
${
npm_engine
}
"
https://semver.io/npm/resolve
)
npm_engine
=
$(
curl
--silent
--get
--data-urlencode
"range=
${
npm_engine
}
"
https://semver.io/npm/resolve
)
fi
fi
status
"Downloading and installing npm
$npm_engine
(replacing version
`
npm
--version
`
)..."
status
"Downloading and installing npm
$npm_engine
(replacing version
`
npm
--version
`
)..."
npm
install
-
g
npm@
$npm_engine
npm
install
-
-quiet
-g
npm@
$npm_engine
2>&1
fi
fi
# Run subsequent commands from the build directory
# Run subsequent commands from the build directory
...
@@ -139,22 +141,22 @@ if [ "$modules_source" == "" ]; then
...
@@ -139,22 +141,22 @@ if [ "$modules_source" == "" ]; then
elif
[
$modules_source
==
"prebuilt"
]
;
then
elif
[
$modules_source
==
"prebuilt"
]
;
then
status
"Rebuilding any native modules for this architecture"
status
"Rebuilding any native modules for this architecture"
npm rebuild
npm rebuild
2>&1
elif
!
$BUILD_CLEAN
&&
!
$cache_busted
;
then
elif
!
$BUILD_CLEAN
&&
!
$cache_busted
;
then
status
"Restoring node modules from cache"
status
"Restoring node modules from cache"
cp
-r
$cache_dir
/node/node_modules
$build_dir
/
cp
-r
$cache_dir
/node/node_modules
$build_dir
/
status
"Pruning unused dependencies"
status
"Pruning unused dependencies"
npm prune
npm prune
2>&1
status
"Installing any new modules"
status
"Installing any new modules"
npm
install
--
userconfig
$build_dir
/.npmrc
npm
install
--
quiet
--userconfig
$build_dir
/.npmrc 2>&1
else
else
status
"Installing node modules"
status
"Installing node modules"
touch
$build_dir
/.npmrc
touch
$build_dir
/.npmrc
npm
install
--
userconfig
$build_dir
/.npmrc
npm
install
--
quiet
--userconfig
$build_dir
/.npmrc 2>&1
status
"Deduping dependency tree"
status
"Deduping dependency tree"
npm dedupe
npm dedupe
2>&1
fi
fi
####### Create a Procfile if possible
####### Create a Procfile if possible
...
@@ -208,4 +210,4 @@ fi
...
@@ -208,4 +210,4 @@ fi
# Show the final dependency tree
# Show the final dependency tree
echo
""
echo
""
npm
ls
--depth
=
0
| indent
npm
ls
--depth
=
0
2>&1
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