Skip to content

Commit 4aa3764

Browse files
Fix: Protoc script version check (RooCodeInc#3071)
* update to split by parts * remove comment
1 parent a525d6d commit 4aa3764

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.changeset/curly-toes-call.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": minor
3+
---
4+
5+
Update protoc script version check to check for versions LOWER than that specified

proto/build-proto.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,25 @@ async function main() {
2222
console.warn(chalk.yellow("Warning: Could not determine protoc version. Continuing anyway..."))
2323
} else {
2424
const version = versionMatch[1]
25-
const requiredVersion = "30.1"
26-
if (version !== requiredVersion) {
25+
const requiredVersion = "30.1.0" // Update to include patch version
26+
27+
// Split versions and convert to numbers, default patch to 0 if not present
28+
const vParts = version.split(".").map(Number)
29+
const rParts = requiredVersion.split(".").map(Number)
30+
31+
const vMajor = vParts[0]
32+
const vMinor = vParts[1]
33+
const vPatch = vParts[2] || 0 // Default to 0 if patch is missing
34+
35+
const rMajor = rParts[0]
36+
const rMinor = rParts[1]
37+
const rPatch = rParts[2] || 0
38+
39+
if (
40+
vMajor < rMajor ||
41+
(vMajor === rMajor && vMinor < rMinor) ||
42+
(vMajor === rMajor && vMinor === rMinor && vPatch < rPatch)
43+
) {
2744
console.warn(
2845
chalk.yellow(`Warning: protoc version ${version} found, but version ${requiredVersion} is required.`),
2946
)

0 commit comments

Comments
 (0)