Allow release tasks to be called individually

by always initializing nextVersion as current and token param
This commit is contained in:
Norbert Renner 2022-06-24 22:17:52 +02:00
parent 7766db7de4
commit b6955cf187

View file

@ -242,11 +242,10 @@ gulp.task('inject', function () {
});
var pkg = require('./package.json');
var nextVersion;
var ghToken;
var nextVersion = pkg.version;
var ghToken = gutil.env.token;
gulp.task('release:init', function (cb) {
ghToken = gutil.env.token;
if (!ghToken) {
return cb(new Error('--token is required (github personal access token'));
}
@ -254,8 +253,6 @@ gulp.task('release:init', function (cb) {
return cb(new Error('--token length must be 40, not ' + ghToken.length));
}
nextVersion = pkg.version;
if (gutil.env.skipnewtag) {
return cb();
}