mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-16 14:28:21 +00:00
fix(release): allow non-publishing branch audits
This commit is contained in:
@@ -11,8 +11,8 @@ const currentVersion = JSON.parse(
|
||||
fs.readFileSync(path.join(repositoryRoot, 'package.json'), 'utf8')
|
||||
).version;
|
||||
|
||||
function runVerifier(tag) {
|
||||
return spawnSync(process.execPath, [verifier, '--tag', tag], {
|
||||
function runVerifier(tag, ...extraArguments) {
|
||||
return spawnSync(process.execPath, [verifier, '--tag', tag, ...extraArguments], {
|
||||
cwd: repositoryRoot,
|
||||
encoding: 'utf8',
|
||||
});
|
||||
@@ -35,3 +35,9 @@ test('release version verifier rejects non-semver tag names', () => {
|
||||
assert.equal(result.status, 1);
|
||||
assert.match(result.stderr, /semantic version tag/);
|
||||
});
|
||||
|
||||
test('release version verifier accepts an untagged non-publishing package audit', () => {
|
||||
const result = runVerifier('main', '--allow-untagged');
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
assert.match(result.stdout, new RegExp(`Non-publishing package version ${currentVersion} matches`));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user