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
0d9b0411
Commit
0d9b0411
authored
Oct 08, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #275 from heroku/more-robust-formatting
test and implementation for more robust output formatting
parents
caf4d3c9
a1651414
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
output.sh
lib/output.sh
+9
-6
makefile
makefile
+2
-2
No files found.
lib/output.sh
View file @
0d9b0411
...
@@ -2,16 +2,19 @@ info() {
...
@@ -2,16 +2,19 @@ info() {
echo
"
$*
"
echo
"
$*
"
}
}
# sed has a problem with the huge build output from npm 3
# format output on both OSX and Ubuntu, cedar-10 and cedar-14, while also splitting to a log file
# try awk? awk '{ print " " $0 }'
output
()
{
output
()
{
local
logfile
=
"
$1
"
local
logfile
=
"
$1
"
local
c
=
's/^/ /'
local
c
=
's/^/ /'
if
[
"
${
STACK
:-
cedar
-14
}
"
=
"cedar"
]
;
then
tee
-a
"
$logfile
"
|
awk
-W
interactive
'{ print " " $0 }'
else
case
$(
uname
)
in
case
$(
uname
)
in
Darwin
)
tee
-a
"
$logfile
"
|
awk
'{ print " " $0 }'
;;
Darwin
)
sed
-l
"
$c
"
|
tee
-i
-a
"
$logfile
"
2> /dev/null
;;
*
)
tee
-a
"
$logfile
"
|
awk
-W
interactive
'{ print " " $0 }'
;;
*
)
stdbuf
-oL
-eL
sed
-u
"
$c
"
|
tee
-i
-a
"
$logfile
"
2> /dev/null
;;
esac
esac
fi
}
}
header
()
{
header
()
{
...
...
makefile
View file @
0d9b0411
...
@@ -2,12 +2,12 @@ test: test-cedar-14 test-cedar-10
...
@@ -2,12 +2,12 @@ test: test-cedar-14 test-cedar-10
test-cedar-14
:
test-cedar-14
:
@
echo
"Running tests in docker (cedar-14)..."
@
echo
"Running tests in docker (cedar-14)..."
@
docker run
-v
$(
shell
pwd
)
:/buildpack:ro
--rm
-it
heroku/cedar:14 bash
-c
'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@
docker run
-v
$(
shell
pwd
)
:/buildpack:ro
--rm
-it
-e
"STACK=cedar-14"
heroku/cedar:14 bash
-c
'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@
echo
""
@
echo
""
test-cedar-10
:
test-cedar-10
:
@
echo
"Running tests in docker (cedar)..."
@
echo
"Running tests in docker (cedar)..."
@
docker run
-v
$(
shell
pwd
)
:/buildpack:ro
--rm
-it
fabiokung/cedar bash
-c
'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@
docker run
-v
$(
shell
pwd
)
:/buildpack:ro
--rm
-it
-e
"STACK=cedar"
fabiokung/cedar bash
-c
'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
shell
:
shell
:
@
echo
"Opening cedar-14 shell..."
@
echo
"Opening cedar-14 shell..."
...
...
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