Skip to content

Commit abfceda

Browse files
Portugal, Marcelomportuga
authored andcommitted
chore(utils.js): Update remaining dev dependencies.
Make changes to utils.js to remove deprecated output attribute usage. fix #5095
1 parent a9ce605 commit abfceda

File tree

3 files changed

+180
-205
lines changed

3 files changed

+180
-205
lines changed

lib/grunt/utils.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,13 @@ var util = module.exports = {
188188

189189
/* Read in whatever angular versions are in lib/test/angular and register karma configs for them all! */
190190
createKarmangularConfig: function() {
191+
var versions;
192+
191193
if (grunt.option('fast')){
192-
var versions = [util.latestAngular()];
194+
versions = [util.latestAngular()];
193195
} else {
194196
// For each file found, make sure it's a directory...
195-
var versions = grunt.option('angular') ? grunt.option('angular').split(/,/) : null || util.angulars();
197+
versions = grunt.option('angular') ? grunt.option('angular').split(/,/) : null || util.angulars();
196198
}
197199

198200
if (grunt.option('angular')) {
@@ -295,7 +297,7 @@ var util = module.exports = {
295297
getCurrentTag: function() {
296298
var out = shell.exec('git tag -l --points-at HEAD', {silent:true});
297299

298-
return out.output.trim();
300+
return out.stdout.trim();
299301
},
300302

301303
// Get the current release version
@@ -306,19 +308,19 @@ var util = module.exports = {
306308
var version, tag;
307309

308310
// If there's a tag on this commit, use it as the version
309-
if (out.code === 0 && out.output.trim() !== '' && out.output.trim() !== null) {
310-
version = out.output.trim();
311+
if (out.code === 0 && out.stdout && out.stdout.trim() !== '' && out.stdout.trim() !== null) {
312+
version = out.stdout.trim();
311313
tag = version;
312314
}
313315
// ...otherwise, get the most recent stable tag
314316
else {
315317
var hash;
316318

317319
// If there isn't one then just get the most recent tag, whatever it is
318-
version = shell.exec('git rev-list --tags --max-count=1 | xargs git describe', {silent:true}).output.trim();
320+
version = shell.exec('git rev-list --tags --max-count=1 | xargs git describe', {silent:true}).stdout.trim();
319321

320322
// Get the short commit hash from the current commit to append to the most recent tag
321-
hash = shell.exec('git rev-parse --short HEAD', {silent:true}).output.trim();
323+
hash = shell.exec('git rev-parse --short HEAD', {silent:true}).stdout.trim();
322324

323325
version = version + '-' + hash;
324326

@@ -333,7 +335,7 @@ var util = module.exports = {
333335
getStableVersion: function() {
334336
var cmd = 'git log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"';
335337
// grunt.log.writeln(cmd);
336-
var out = shell.exec(cmd, {silent:true}).output;
338+
var out = shell.exec(cmd, {silent:true}).stdout;
337339

338340
// grunt.log.writeln(lines);
339341

0 commit comments

Comments
 (0)