enso/tools/ci/nightly/bump-version.js
2021-05-05 11:58:14 +01:00

14 lines
341 B
JavaScript

const fs = require("fs");
const path = "build.sbt";
const version = process.argv[2];
const content = fs.readFileSync(path, { encoding: "utf-8" });
const updated = content.replace(
/val ensoVersion.*= ".*"/g,
'val ensoVersion = "' + version + '"'
);
fs.writeFileSync(path, updated);
console.log("Updated build version to " + version);