mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Update build process.
This commit is contained in:
parent
d83856be32
commit
3e55f1c648
2 changed files with 8 additions and 15 deletions
21
makefile.js
21
makefile.js
|
@ -21,27 +21,20 @@ module.exports = function (make) {
|
|||
|
||||
var child_process = require('child_process');
|
||||
|
||||
child_process.exec('git rev-list --tags --max-count=1', {cwd: root}, function (err, out) {
|
||||
child_process.exec('git rev-list v' + pkg.version + '..HEAD', {cwd: root}, function (err, out) {
|
||||
|
||||
if (err) {
|
||||
callback();
|
||||
} else {
|
||||
child_process.exec('git rev-list ' + out.trim() + '..HEAD', {cwd: root}, function (err, out) {
|
||||
|
||||
if (err) {
|
||||
callback();
|
||||
} else {
|
||||
var lines = out.trim().split(/\r?\n/);
|
||||
callback('+' + lines.length + '~' + lines[0].substring(0, 7));
|
||||
}
|
||||
});
|
||||
try {
|
||||
var lines = out.trim().split(/\r?\n/);
|
||||
callback('+' + lines.length + '~' + lines[0].substring(0, 7));
|
||||
} catch (e) {
|
||||
callback('+X');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
make.version('>=0.10.0');
|
||||
make.defaults('build');
|
||||
make.defaults('release');
|
||||
|
||||
|
||||
make.target('check-version', [], 'add git info to dev builds').async(function (done, fail) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue