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
2845ddd8
Unverified
Commit
2845ddd8
authored
Apr 11, 2019
by
Jeremy Morrell
Committed by
GitHub
Apr 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate prebuild step in log output (#646)
* Separate prebuild step in log output
parent
851c0166
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
+17
-4
compile
bin/compile
+2
-2
dependencies.sh
lib/dependencies.sh
+13
-0
package.json
test/fixtures/pre-post-build-scripts/package.json
+1
-1
run
test/run
+1
-1
No files found.
bin/compile
View file @
2845ddd8
...
@@ -238,8 +238,6 @@ restore_cache | output "$LOG_FILE"
...
@@ -238,8 +238,6 @@ restore_cache | output "$LOG_FILE"
build_dependencies
()
{
build_dependencies
()
{
local
cache_status start
local
cache_status start
run_if_present
"
$BUILD_DIR
"
'heroku-prebuild'
cache_status
=
"
$(
get_cache_status
"
$CACHE_DIR
"
)
"
cache_status
=
"
$(
get_cache_status
"
$CACHE_DIR
"
)
"
start
=
$(
nowms
)
start
=
$(
nowms
)
...
@@ -259,6 +257,8 @@ build_dependencies() {
...
@@ -259,6 +257,8 @@ build_dependencies() {
log_build_scripts
"
$BUILD_DIR
"
log_build_scripts
"
$BUILD_DIR
"
}
}
run_prebuild_script
"
$BUILD_DIR
"
| output
"
$LOG_FILE
"
header
"Installing dependencies"
| output
"
$LOG_FILE
"
header
"Installing dependencies"
| output
"
$LOG_FILE
"
build_dependencies | output
"
$LOG_FILE
"
build_dependencies | output
"
$LOG_FILE
"
...
...
lib/dependencies.sh
View file @
2845ddd8
...
@@ -40,6 +40,19 @@ run_if_present() {
...
@@ -40,6 +40,19 @@ run_if_present() {
fi
fi
}
}
run_prebuild_script
()
{
local
build_dir
=
${
1
:-}
local
has_heroku_prebuild_script
has_heroku_prebuild_script
=
$(
has_script
"
$build_dir
/package.json"
"heroku-prebuild"
)
if
[[
"
$has_heroku_prebuild_script
"
==
"true"
]]
;
then
mcount
"script.heroku-prebuild"
header
"Prebuild"
run_if_present
"
$build_dir
"
'heroku-prebuild'
fi
}
run_build_script
()
{
run_build_script
()
{
local
build_dir
=
${
1
:-}
local
build_dir
=
${
1
:-}
local
has_build_script has_heroku_build_script
local
has_build_script has_heroku_build_script
...
...
test/fixtures/pre-post-build-scripts/package.json
View file @
2845ddd8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"url"
:
"http://github.com/example/example.git"
"url"
:
"http://github.com/example/example.git"
},
},
"engines"
:
{
"engines"
:
{
"node"
:
"
~0.10.0
"
"node"
:
"
10.x
"
},
},
"scripts"
:
{
"scripts"
:
{
"heroku-prebuild"
:
"echo heroku-prebuild hook message"
,
"heroku-prebuild"
:
"echo heroku-prebuild hook message"
,
...
...
test/run
View file @
2845ddd8
...
@@ -1058,7 +1058,7 @@ testBuildMetaData() {
...
@@ -1058,7 +1058,7 @@ testBuildMetaData() {
assertFileContains
"build-uuid="
$log_file
assertFileContains
"build-uuid="
$log_file
# binary versions
# binary versions
assertFileContains
"node-version-request=
~0.10.0
"
$log_file
assertFileContains
"node-version-request=
10.x
"
$log_file
assertFileContains
"npm-version-request= "
$log_file
assertFileContains
"npm-version-request= "
$log_file
# log build scripts
# log build scripts
...
...
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