Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34143ca commit 7cc0c60Copy full SHA for 7cc0c60
build/lib/util.js
@@ -10,6 +10,7 @@ var _ = require('underscore');
10
var path = require('path');
11
var fs = require('fs');
12
var rimraf = require('rimraf');
13
+var git = require('./git');
14
15
var NoCancellationToken = {
16
isCancellationRequested: function () {
@@ -275,4 +276,14 @@ exports.downloadExtensions = function(extensions) {
275
276
});
277
278
return es.merge(streams);
279
+};
280
+
281
+exports.getVersion = function (root) {
282
+ var version = process.env['BUILD_SOURCEVERSION'];
283
284
+ if (!version || !/^[0-9a-f]{40}$/i.test(version)) {
285
+ version = git.getVersion(root);
286
+ }
287
288
+ return version;
289
};
0 commit comments