Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
56632ea2
Commit
56632ea2
authored
Oct 19, 2013
by
Dane Springmeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix display of node-gyp output when a source compile is used - closes #215
parent
d8691e27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
26 deletions
+8
-26
build.js
build.js
+8
-26
No files found.
build.js
View file @
56632ea2
...
...
@@ -30,6 +30,7 @@ var opts = {
target_arch
:
process
.
arch
,
platform
:
process
.
platform
,
uri
:
'http://node-sqlite3.s3.amazonaws.com/'
,
tool
:
'node-gyp'
,
paths
:
{}
}
...
...
@@ -87,42 +88,23 @@ function test(opts,try_build,callback) {
}
function
build
(
opts
,
callback
)
{
var
shell_cmd
=
process
.
platform
===
'win32'
?
'node-gyp.cmd'
:
'node-gyp'
;
var
shell_cmd
=
opts
.
tool
;
if
(
opts
.
tool
==
'node-gyp'
&&
process
.
platform
===
'win32'
)
{
shell_cmd
=
'node-gyp.cmd'
;
}
var
shell_args
=
[
'rebuild'
].
concat
(
opts
.
args
);
var
cmd
=
cp
.
spawn
(
shell_cmd
,
shell_args
);
cmd
.
on
(
'
error'
,
function
(
err
)
{
var
cmd
=
cp
.
spawn
(
shell_cmd
,
shell_args
,
{
cwd
:
undefined
,
env
:
process
.
env
,
customFds
:
[
0
,
1
,
2
]}
);
cmd
.
on
(
'
close'
,
function
(
err
,
stdout
,
std
err
)
{
if
(
err
)
{
return
callback
(
new
Error
(
"Failed to execute '"
+
shell_cmd
+
' '
+
shell_args
.
join
(
' '
)
+
"' ("
+
err
+
")"
));
}
});
cmd
.
stdout
.
on
(
'data'
,
function
(
data
)
{
console
.
log
(
data
.
slice
(
0
,
data
.
length
-
1
).
toString
());
})
// TODO - this node-gyp output comes through formatted poorly, hence disabled
/*
cmd.stderr.on('data',function(data) {
console.error(data.slice(0,data.length-1).toString());
})
*/
cmd
.
on
(
'exit'
,
function
(
err
)
{
if
(
err
)
{
if
(
err
===
127
)
{
console
.
error
(
'node-gyp not found! Please upgrade your install of npm! You need at least 1.1.5 (I think) '
+
'and preferably 1.1.30.'
);
}
else
{
console
.
error
(
'Build failed'
);
}
return
callback
(
err
);
}
move
(
opts
,
callback
);
});
}
function
tarball
(
opts
,
callback
)
{
var
source
=
path
.
dirname
(
opts
.
paths
.
staged_module_file_name
);
log
(
'
c
ompressing: '
+
source
+
' to '
+
opts
.
paths
.
tarball_path
);
log
(
'
C
ompressing: '
+
source
+
' to '
+
opts
.
paths
.
tarball_path
);
new
targz
(
9
).
compress
(
source
,
opts
.
paths
.
tarball_path
,
function
(
err
)
{
if
(
err
)
return
callback
(
err
);
log
(
'Versioned binary staged for upload at '
+
opts
.
paths
.
tarball_path
);
...
...
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