mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-28 08:49:38 +02:00
fix: publish first stable release as 0.1.0 (#143)
This commit is contained in:
parent
b4c77c0563
commit
7110aa6f5c
9 changed files with 294 additions and 7 deletions
|
|
@ -35,6 +35,7 @@ describe('semantic-release config', () => {
|
|||
releaseExecOptions(config).prepareCmd,
|
||||
/update-public-release-version\.mjs "\$\{nextRelease\.version\}" "latest"/,
|
||||
);
|
||||
assert.ok(config.plugins.includes('./scripts/semantic-release-version-policy.cjs'));
|
||||
});
|
||||
|
||||
it('rejects stable releases from non-main branches', () => {
|
||||
|
|
@ -51,4 +52,16 @@ describe('semantic-release config', () => {
|
|||
);
|
||||
assert.match(analyzeExec[1].analyzeCommitsCmd, /FORCE_RELEASE === 'true' \? 'patch' : ''/);
|
||||
});
|
||||
|
||||
it('does not configure any commit type to create an automatic major release', () => {
|
||||
const config = createReleaseConfig({ KTX_RELEASE_KIND: 'stable', GITHUB_REF_NAME: 'main' });
|
||||
const analyzer = config.plugins.find(
|
||||
(plugin) => Array.isArray(plugin) && plugin[0] === '@semantic-release/commit-analyzer',
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
analyzer[1].releaseRules.some((rule) => rule.release === 'major'),
|
||||
false,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue