Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: slickGridVersion property should also be updated in slick.grid #717

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 214,13 @@ function updatePackageVersion(newVersion) {
*/
function updateSlickGridVersion(newVersion) {
const slickGridJs = fs.readFileSync(path.resolve(__dirname, '../slick.grid.js'), { encoding: 'utf8', flag: 'r' });
const updatedSlickGridJs = slickGridJs.replace(/(SlickGrid v)([0-9-.alpha|beta]*)/gi, `$1${newVersion}`);

// replaces version in 2 areas (a version could be "2.4.45" or "2.4.45-alpha.0"):
// 1- in top comments, ie: SlickGrid v2.4.45
// 2- in public API definitions, ie: "slickGridVersion": "2.4.45",
const updatedSlickGridJs = slickGridJs
.replace(/(SlickGrid v)([0-9-.alpha|beta]*)/gi, `$1${newVersion}`)
.replace(/("slickGridVersion"): "([0-9\.]*([\-\.]?alpha[\-\.]?|[\-\.]?beta[\-\.]?)?[0-9\-\.]*)"/gi, `$1: "${newVersion}"`);

if (options.dryRun) {
console.log(`${chalk.magenta('[dry-run]')}`);
Expand Down