MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / validateVersion

Function validateVersion

scripts/generate-version.ts:24–30  ·  view source on GitHub ↗
(name: string, value: string)

Source from the content-addressed store, hash-verified

22const VERSION_REGEX = /^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.\-]+)?(\+[a-zA-Z0-9.\-]+)?$/;
23
24function validateVersion(name: string, value: string): void {
25 if (!VERSION_REGEX.test(value)) {
26 throw new Error(
27 `Invalid ${name} in package.json: ${JSON.stringify(value)}. Expected a version string.`,
28 );
29 }
30}
31
32async function main(): Promise<void> {
33 const repoRoot = process.cwd();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected