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
edf4c8e7
Commit
edf4c8e7
authored
Jan 07, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation for dynamically-created Procfile support
parent
f8632a74
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
compile
bin/compile
+2
-0
test
bin/test
+13
-0
package.json
test/dynamic-procfile/package.json
+18
-0
No files found.
bin/compile
View file @
edf4c8e7
...
@@ -153,6 +153,8 @@ head "Checking startup method"
...
@@ -153,6 +153,8 @@ head "Checking startup method"
if
[
"
$start_method
"
==
"Procfile"
]
;
then
if
[
"
$start_method
"
==
"Procfile"
]
;
then
info
"Found Procfile"
info
"Found Procfile"
elif
test
-f
$build_dir
/Procfile
;
then
info
"Procfile created during build"
elif
[
"
$start_method
"
==
"npm start"
]
;
then
elif
[
"
$start_method
"
==
"npm start"
]
;
then
info
"No Procfile; Adding 'web: npm start' to new Procfile"
info
"No Procfile; Adding 'web: npm start' to new Procfile"
echo
"web: npm start"
>
$build_dir
/Procfile
echo
"web: npm start"
>
$build_dir
/Procfile
...
...
bin/test
View file @
edf4c8e7
...
@@ -7,6 +7,12 @@ testDetectWithPackageJson() {
...
@@ -7,6 +7,12 @@ testDetectWithPackageJson() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testDetectWithServer
()
{
detect
"server-present-only"
assertCaptured
"Node.js"
assertCapturedSuccess
}
testDetectWithoutPackageJson
()
{
testDetectWithoutPackageJson
()
{
detect
"no-package-json"
detect
"no-package-json"
assertCapturedError 1
""
assertCapturedError 1
""
...
@@ -143,6 +149,13 @@ testProcfileAbsentNpmStartAbsent() {
...
@@ -143,6 +149,13 @@ testProcfileAbsentNpmStartAbsent() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testDynamicProcfile
()
{
compile
"dynamic-procfile"
assertCaptured
"Procfile created during build"
assertFileContains
"web: node index.js customArg"
"
${
compile_dir
}
/Procfile"
assertCapturedSuccess
}
testProcfileAbsentServerPresent
()
{
testProcfileAbsentServerPresent
()
{
compile
"procfile-absent-server-present"
compile
"procfile-absent-server-present"
assertCaptured
"Start mechanism: server.js"
assertCaptured
"Start mechanism: server.js"
...
...
test/dynamic-procfile/package.json
0 → 100644
View file @
edf4c8e7
{
"name"
:
"node-buildpack-test-app"
,
"version"
:
"0.0.1"
,
"description"
:
"node buildpack integration test app"
,
"repository"
:
{
"type"
:
"git"
,
"url"
:
"http://github.com/example/example.git"
},
"dependencies"
:
{
"hashish"
:
"*"
},
"engines"
:
{
"node"
:
"0.10.x"
},
"scripts"
:
{
"postinstall"
:
"echo 'web: node index.js customArg' > Procfile"
}
}
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