summaryrefslogtreecommitdiff
path: root/scripts/check-versions.js
diff options
context:
space:
mode:
authormatt korwel <[email protected]>2025-07-07 16:36:51 -0700
committerGitHub <[email protected]>2025-07-07 23:36:51 +0000
commita4097ae6f95afab0005a0f76a9334715f6b3afef (patch)
treee05f57f991356c0954a2baf75f3d4bff957a157a /scripts/check-versions.js
parent4e84989d8f6330027327f4fc214055c1cd7bf45b (diff)
Release and Packaging: Clean up (#3489)
Diffstat (limited to 'scripts/check-versions.js')
-rw-r--r--scripts/check-versions.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/scripts/check-versions.js b/scripts/check-versions.js
deleted file mode 100644
index 230743a0..00000000
--- a/scripts/check-versions.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * @license
- * Copyright 2025 Google LLC
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { readFileSync } from 'fs';
-import path from 'path';
-
-function readPackageJson(dir) {
- const p = path.join(dir, 'package.json');
- return JSON.parse(readFileSync(p, 'utf-8'));
-}
-
-const root = readPackageJson('.');
-const cli = readPackageJson('packages/cli');
-const core = readPackageJson('packages/core');
-
-const errors = [];
-
-console.log('Checking version consistency...');
-
-// 1. Check that all package versions are the same.
-if (root.version !== cli.version || root.version !== core.version) {
- errors.push(
- `Version mismatch: root (${root.version}), cli (${cli.version}), core (${core.version})`,
- );
-} else {
- console.log(`- All packages are at version ${root.version}.`);
-}
-
-// 2. Check that the cli's dependency on core matches the core version.
-const coreDepVersion = cli.dependencies['@google/gemini-cli-core'];
-const expectedCoreVersion = `^${core.version}`;
-if (
- coreDepVersion !== expectedCoreVersion &&
- coreDepVersion !== 'file:../core'
-) {
- errors.push(
- `CLI dependency on core is wrong: expected ${expectedCoreVersion} or "file:../core", got ${coreDepVersion}`,
- );
-} else {
- console.log(`- CLI dependency on core (${coreDepVersion}) is correct.`);
-}
-
-// 3. Check that the sandbox image tag matches the root version.
-const imageUri = root.config.sandboxImageUri;
-const imageTag = imageUri.split(':').pop();
-if (imageTag !== root.version) {
- errors.push(
- `Sandbox image tag mismatch: expected ${root.version}, got ${imageTag}`,
- );
-} else {
- console.log(`- Sandbox image tag (${imageTag}) is correct.`);
-}
-
-if (errors.length > 0) {
- console.error('\nVersion consistency checks failed:');
- for (const error of errors) {
- console.error(`- ${error}`);
- }
- process.exit(1);
-}
-
-console.log('\nAll version checks passed!');