swappy/script/bump-meson-build.js
Jeremy Attali 2878474e7c
chore(release): add bump meson script (#39)
Mixing C code with Javascript files, what's not to love.

Simply run the following line to generate a new standard version:

```
npx standard-version --sign
```
2020-06-22 23:03:37 -04:00

12 lines
367 B
JavaScript
Executable File

const projectVersionRegExp = /version: '(?<version>\d+\.\d+\.\d+)',/;
module.exports.readVersion = function (contents) {
const matches = contents.match(projectVersionRegExp);
return matches ? matches[1] : "unknown";
};
module.exports.writeVersion = function (_contents, version) {
return _contents.replace(projectVersionRegExp, `version: '${version}',`);
};