MCPcopy
hub / github.com/QwikDev/qwik / setReleaseVersion

Function setReleaseVersion

scripts/release.ts:53–76  ·  view source on GitHub ↗
(config: BuildConfig)

Source from the content-addressed store, hash-verified

51}
52
53export async function setReleaseVersion(config: BuildConfig) {
54 const distTag = String(config.setDistTag);
55 if (!config.setDistTag || distTag === '') {
56 // ensure npm dist tag for an actual release
57 panic(`Invalid npm dist tag "${distTag}"`);
58 }
59
60 console.log(`💫 Set release npm dist tag: ${distTag}`);
61
62 config.distVersion = await getVersion('release');
63
64 const validVersion = semver.valid(config.distVersion)!;
65 if (!validVersion) {
66 panic(`Invalid semver version "${config.distVersion}"`);
67 }
68
69 console.log(`🔥 Set release npm version: ${config.distVersion}`);
70
71 // check this @builder.io/qwik version isn't already published
72 await checkExistingNpmVersion('@builder.io/qwik', config.distVersion);
73
74 // check this @builder.io/qwik-city version isn't already published
75 await checkExistingNpmVersion('@builder.io/qwik-city', config.distVersion);
76}
77
78export async function prepareReleaseVersion(config: BuildConfig) {
79 const rootPkg = await readPackageJson(config.rootDir);

Callers 1

buildFunction · 0.90

Calls 3

panicFunction · 0.90
getVersionFunction · 0.85
checkExistingNpmVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…