Skip to content

Commit a06b58b

Browse files
committed
fix: repair bump tasks not updating version number
1 parent c6c6d7d commit a06b58b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.gulp/tasks/bump.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,20 @@ import runSequence from 'run-sequence';
1212

1313
var $ = require('gulp-load-plugins')();
1414
var argv = yrgv.argv;
15-
let envRegExp = new RegExp('([\'|\"]?__version__[\'|\"]?[ ]*[:|=][ ]*[\'|\"]?)(\\d+\\.\\d+\\.\\d+)(-[0-9A-Za-z\.-]+)?([\'|\"]?)', 'i');
1615

1716

1817
gulp.task('bump-env-version', () => {
1918
return gulp.src(`${paths.utils}/info.py`)
20-
.pipe($.if((Object.keys(argv).length === 2), $.bump({ regex: envRegExp })))
21-
.pipe($.if(argv.patch, $.bump({ regex: envRegExp })))
22-
.pipe($.if(argv.minor, $.bump({ type: 'minor', regex: envRegExp })))
23-
.pipe($.if(argv.major, $.bump({ type: 'major', regex: envRegExp })))
19+
.pipe($.if((Object.keys(argv).length === 4), $.bump({ key: '__version__' })))
20+
.pipe($.if(argv.minor, $.bump({ type: 'minor', key: '__version__' })))
21+
.pipe($.if(argv.major, $.bump({ type: 'major', key: '__version__' })))
2422
.pipe(gulp.dest(paths.utils));
2523
});
2624

2725

2826
gulp.task('bump-pkg-version', () => {
2927
return gulp.src('./package.json')
30-
.pipe($.if((Object.keys(argv).length === 2), $.bump()))
31-
.pipe($.if(argv.patch, $.bump()))
28+
.pipe($.if((Object.keys(argv).length === 4), $.bump()))
3229
.pipe($.if(argv.minor, $.bump({ type: 'minor' })))
3330
.pipe($.if(argv.major, $.bump({ type: 'major' })))
3431
.pipe(gulp.dest('./'));

0 commit comments

Comments
 (0)