Skip to content

Commit

Permalink
chore(gulp): add bump versions with Gulp
Browse files Browse the repository at this point in the history
Signed-off-by: MD Amanalikhani <md.akhi.ir@gmail.com>
Co-authored-by: MD Amanalikhani <md.akhi.ir@gmail.com>
  • Loading branch information
md-akhi committed Aug 16, 2024
1 parent 08cef0a commit a4fa306
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ function replaceDocBlockInfo() {
.pipe(gulp.dest("src/"));
}

function bumpVersion() {
return gulp
.src(["src/**/*.ts"])
.pipe(
replace(
/\* @(version( [\w\d:\/\.\-]+)+)/gm,
`* @version Release: ${pkg.version}`
)
)
.pipe(
replace(
/VERSION: string = "([\w\d:\/\.\-]+)"/gm,
`VERSION: string = "${pkg.version}"`
)
)
.pipe(gulp.dest("src/"));
}

function cleanCompile(cb) {
return del(["dist", "src/browser"], cb);
}
Expand Down Expand Up @@ -184,7 +202,8 @@ exports.default = gulp.task(
compressBrowserJS,
makeBrowserTypes,
cleanBrowserTS,
replaceDocBlockInfo
replaceDocBlockInfo,
bumpVersion
)
);

Expand Down

0 comments on commit a4fa306

Please sign in to comment.