Skip to content
Open
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
7 changes: 5 additions & 2 deletions tools/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ function generateVersionHpp() {

// Read version tag
var ver1 = readAll("..\\Solutions\\version.txt");
// Remove end-of-line
ver1 = ver1.trim();
// Remove leading/trailing whitespace. Use a regex rather than String.trim() so this
// runs under the Windows Script Host JScript engine (cscript), which does not
// implement String.prototype.trim(); the global anchored pattern also fully strips
// trailing newlines (the CodeQL incomplete-sanitization concern).
ver1 = ver1.replace(/^\s+|\s+$/g, "");
ver1 = updateYearAndDay(ver1);
// console.log("version.txt => " + ver1 + "\n");
var ver2 = ver1.split(".").join(",");
Expand Down
Loading