Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
matrix:
- export NODE_VERSION="0.12"
- export NODE_VERSION="4.1"
- export NODE_VERSION="5"
matrix:
fast_finish: true
before_install:
Expand Down
4 changes: 3 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ environment:
matrix:
# Node.js
- nodejs_version: "0.12"
# io.js
# Node.js
- nodejs_version: "4.1"
# Node.js
- nodejs_version: "5"

matrix:
fast_finish: true
Expand Down
3 changes: 3 additions & 0 deletions generate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ var generateMissingTests = require("./scripts/generateMissingTests");

module.exports = function generate() {
return new Promise(function(resolve, reject) {
console.info("[nodegit] Generating started.");
try {
generateJson();
generateNativeCode();
generateMissingTests();
console.info("[nodegit] Generating completed.");
resolve();
}
catch(e) {
console.info("[nodegit] Generating failed.");
reject(e);
}
});
Expand Down
2 changes: 2 additions & 0 deletions lifecycleScripts/configureLibssh2.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ module.exports = function retrieveExternalDependencies() {
{cwd: rooted("vendor/libssh2/")},
function(err, stdout, stderr) {
if (err) {
console.info("[nodegit] Configuring libssh2 failed.");
console.error(err);
console.error(stderr);
reject(err, stderr);
}
else {
console.info("[nodegit] Configuring libssh2 succeeded.");
resolve(stdout);
}
}
Expand Down
7 changes: 7 additions & 0 deletions lifecycleScripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ function prepareAndBuild() {
return prepareForBuild()
.then(function() {
return build();
}, function() {
console.info("[nodegit] prepareAndBuild step failed.");
process.exit(13);
}).catch(function(e) {
console.info("[nodegit] prepareAndBuild step crashed.");
process.exit(13);
});
}

Expand Down Expand Up @@ -111,6 +117,7 @@ function build() {
function(err, stderr) {
console.error(err);
console.error(stderr);
console.info("[nodegit] Compilation failed.");
process.exitCode = 13;
}
);
Expand Down
32 changes: 28 additions & 4 deletions lifecycleScripts/prepareForBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,34 @@ module.exports = function prepareForBuild() {
}
});
}).then(function() {
return Promise.all([
configure(),
generate()
]);
return new Promise(function(resolve, reject) {

configure().catch(function(e) {
console.info("[nodegit] Configuration malfunctioned:");
console.log(e || "[nodegit] No Configuration exception.");
reject();
}).then(function() {
console.info("[nodegit] Configuration complete.");
return generate();
}, function(e) {
console.info("[nodegit] Configuration failed:");
console.log(e || "[nodegit] No Configuration failure exception.");
reject();
}).catch(function(e) {
console.info("[nodegit] Generation malfunctioned:");
console.log(e || "[nodegit] No Generation exception.");
reject();
}).then(function() {
console.info("[nodegit] Generation complete.");
resolve();
}, function(e) {
console.info("[nodegit] Generation failed:");
console.log(e || "[nodegit] No Generation failure exception.");
reject();
});

});

});
};

Expand Down