Skip to content

Commit 5a68122

Browse files
authored
chore: remove version from server.json for registry publishing (#685)
1 parent 76499b0 commit 5a68122

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/generateArguments.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function updateServerJsonEnvVars(envVars: EnvironmentVariable[]): void {
178178
version?: string;
179179
packages: {
180180
registryType?: string;
181-
identifier?: string;
181+
identifier: string;
182182
environmentVariables: EnvironmentVariable[];
183183
packageArguments?: unknown[];
184184
version?: string;
@@ -209,12 +209,13 @@ function updateServerJsonEnvVars(envVars: EnvironmentVariable[]): void {
209209
for (const pkg of serverJson.packages) {
210210
pkg.environmentVariables = envVarsArray as EnvironmentVariable[];
211211
pkg.packageArguments = packageArguments;
212-
pkg.version = version;
213212

214-
// Update OCI identifier version tag if this is an OCI package
215-
if (pkg.registryType === "oci" && pkg.identifier) {
213+
// For OCI packages, update the version tag in the identifier and not a version field
214+
if (pkg.registryType === "oci") {
216215
// Replace the version tag in the OCI identifier (e.g., docker.io/mongodb/mongodb-mcp-server:1.0.0)
217216
pkg.identifier = pkg.identifier.replace(/:[^:]+$/, `:${version}`);
217+
} else {
218+
pkg.version = version;
218219
}
219220
}
220221
}

server.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,7 @@
637637
"description": "API key for Voyage AI embeddings service (required for vector search operations with text-to-embedding conversion).",
638638
"isRequired": false
639639
}
640-
],
641-
"version": "1.2.0"
640+
]
642641
}
643642
]
644643
}

0 commit comments

Comments
 (0)