Skip to content

Commit 1dfd4db

Browse files
committed
Improve version bump logic
1 parent 18d3d0b commit 1dfd4db

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

gulpfile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@ gulp.task('typings', ['clean'], function () {
3434
});
3535

3636
gulp.task('bump', ['bump-js', 'bump-css'], function(){
37-
return gulp.src(['./bower.json', './package.json', './src/stable/tableexport.js'])
37+
return gulp.src(['./bower.json', './package.json'])
3838
.pipe(bump())
3939
.pipe(gulp.dest('./'));
4040
});
4141

4242
gulp.task('bump-js', function () {
4343
return gulp.src(['src/stable/js/tableexport.js'])
44-
.pipe(replace(/(v\d\.\d\.)(\d+)/g, function (matches, match1, match2) {
44+
.pipe(replace(/(v\d+\.\d+\.)(\d+)/g, function (matches, match1, match2) {
45+
return match1 + (Number(match2)+1);
46+
}))
47+
.pipe(replace(/(version: "\d+\.\d+\.)(\d+)/g, function (matches, match1, match2) {
4548
return match1 + (Number(match2)+1);
4649
}))
4750
.pipe(gulp.dest('src/stable/js/'))
@@ -52,7 +55,7 @@ gulp.task('bump-js', function () {
5255

5356
gulp.task('bump-css', function () {
5457
gulp.src(['src/stable/css/tableexport.css'])
55-
.pipe(replace(/(v\d\.\d\.)(\d+)/g, function (matches, match1, match2) {
58+
.pipe(replace(/(v\d+\.\d+\.)(\d+)/g, function (matches, match1, match2) {
5659
return match1 + (Number(match2) + 1);
5760
}))
5861
.pipe(gulp.dest('src/stable/css/'))

0 commit comments

Comments
 (0)