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

Function resolveVersion

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls 1

infoFunction · 0.70

Tested by

no test coverage detected