mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Update build process.
This commit is contained in:
parent
d83856be32
commit
3e55f1c648
2 changed files with 8 additions and 15 deletions
17
makefile.js
17
makefile.js
|
@ -21,27 +21,20 @@ module.exports = function (make) {
|
||||||
|
|
||||||
var child_process = require('child_process');
|
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) {
|
try {
|
||||||
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/);
|
var lines = out.trim().split(/\r?\n/);
|
||||||
callback('+' + lines.length + '~' + lines[0].substring(0, 7));
|
callback('+' + lines.length + '~' + lines[0].substring(0, 7));
|
||||||
}
|
} catch (e) {
|
||||||
});
|
callback('+X');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
make.version('>=0.10.0');
|
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) {
|
make.target('check-version', [], 'add git info to dev builds').async(function (done, fail) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/*global jQuery, marked, Modernizr, moment, _ */
|
/*global jQuery, marked, Modernizr, moment, Prism, _ */
|
||||||
modulejs.define('$', function () { return jQuery; });
|
modulejs.define('$', function () { return jQuery; });
|
||||||
modulejs.define('marked', function () { return marked; });
|
modulejs.define('marked', function () { return marked; });
|
||||||
modulejs.define('modernizr', function () { return Modernizr; });
|
modulejs.define('modernizr', function () { return Modernizr; });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue