Generate code on versioning
This commit is contained in:
parent
9e42f25c21
commit
97e02b33b7
3
version
3
version
|
@ -4,6 +4,7 @@
|
|||
|
||||
const {readFileSync, writeFileSync} = require('fs');
|
||||
const {spawnSync} = require('child_process');
|
||||
const {join} = require('path');
|
||||
|
||||
const currentVersion = /^version = "(\d+)\.(\d+)\.(\d+)"\s*$/m.exec(readFileSync('Cargo.toml', 'utf8')).slice(1).map(n => Number.parseInt(n, 10));
|
||||
|
||||
|
@ -98,6 +99,8 @@ for (const f of ['README.md', 'bench/README.md']) {
|
|||
replaceInFile(f, /(wilsonl\.in\/hyperbuild\/bench\/)\d+\.\d+\.\d+/g, `$1${NEW_VERSION}`);
|
||||
}
|
||||
|
||||
cmd('npx', 'ts-node', 'attrs.ts', {workingDir: join(__dirname, 'gen')});
|
||||
cmd('npx', 'ts-node', 'entities.ts', {workingDir: join(__dirname, 'gen')});
|
||||
cmd('cargo', 'generate-lockfile');
|
||||
cmd('git', 'add', '-A');
|
||||
cmd('git', 'commit', '-m', NEW_VERSION);
|
||||
|
|
Loading…
Reference in New Issue