Build and test before versioning
This commit is contained in:
parent
c626110160
commit
f646c95f9e
4
version
4
version
|
@ -66,6 +66,9 @@ const replaceInFile = (path, pattern, replacement) => writeFileSync(path, readFi
|
|||
if (cmd('git', 'status', '--porcelain', {throwOnStderr: true, captureStdio: true}).stdout) {
|
||||
throw new Error('Working directory not clean');
|
||||
}
|
||||
cmd('bash', './gen.sh', {workingDir: join(__dirname, 'gen')});
|
||||
// This will also build.
|
||||
cmd('cargo', 'test');
|
||||
|
||||
for (const f of ['Cargo.toml', 'cli/Cargo.toml', 'nodejs/native/Cargo.toml', 'java/Cargo.toml', 'python/Cargo.toml', 'ruby/Cargo.toml']) {
|
||||
replaceInFile(f, /^version = "\d+\.\d+\.\d+"\s*$/m, `version = "${NEW_VERSION}"`);
|
||||
|
@ -99,7 +102,6 @@ for (const f of ['README.md', 'bench/README.md']) {
|
|||
replaceInFile(f, /(wilsonl\.in\/hyperbuild\/bench\/)\d+\.\d+\.\d+/g, `$1${NEW_VERSION}`);
|
||||
}
|
||||
|
||||
cmd('bash', './gen.sh', {workingDir: join(__dirname, 'gen')});
|
||||
cmd('cargo', 'generate-lockfile');
|
||||
cmd('git', 'add', '-A');
|
||||
cmd('git', 'commit', '-m', NEW_VERSION);
|
||||
|
|
Loading…
Reference in New Issue