MCPcopy Create free account
hub / github.com/alibaba/open-code-review / resolveVersion

Function resolveVersion

scripts/install.js:71–81  ·  view source on GitHub ↗
(pkg)

Source from the content-addressed store, hash-verified

69}
70
71function resolveVersion(pkg) {
72 const envVersion = process.env.OCR_VERSION;
73 if (envVersion) {
74 const v = envVersion.startsWith("v") ? envVersion.slice(1) : envVersion;
75 info(`Using pinned version from OCR_VERSION: ${v}`);
76 return v;
77 }
78
79 info(`Using version from package.json: ${pkg.version}`);
80 return pkg.version;
81}
82
83function buildUrl(pattern, vars) {
84 return pattern

Callers 1

mainFunction · 0.85

Calls 1

infoFunction · 0.70

Tested by

no test coverage detected