refactor: remove docker tagging step from sandbox publishing (#1223)
This commit is contained in:
parent
0ebac0b896
commit
10a83a6395
|
@ -35,11 +35,10 @@
|
|||
"build:core": "npm run build --workspace packages/core",
|
||||
"build:packages": "npm run build:core && npm run build:cli",
|
||||
"build:docker": "node scripts/build_sandbox.js -s",
|
||||
"tag:docker": "docker tag gemini-cli-sandbox ${SANDBOX_IMAGE_REGISTRY:?SANDBOX_IMAGE_REGISTRY not set}/${SANDBOX_IMAGE_NAME:?SANDBOX_IMAGE_NAME not set}:$npm_package_version",
|
||||
"prepare:cli-packagejson": "node scripts/prepare-cli-packagejson.js",
|
||||
"publish:sandbox": "node scripts/publish-sandbox.js",
|
||||
"publish:npm": "npm publish --workspaces ${NPM_PUBLISH_TAG:+--tag=$NPM_PUBLISH_TAG} ${NPM_DRY_RUN:+--dry-run}",
|
||||
"publish:release": "npm run build:packages && npm run prepare:cli-packagejson && npm run build:docker && npm run tag:docker && npm run publish:sandbox && npm run publish:npm",
|
||||
"publish:release": "npm run build:packages && npm run prepare:cli-packagejson && npm run build:docker && npm run publish:sandbox && npm run publish:npm",
|
||||
"telemetry": "node scripts/telemetry.js",
|
||||
"start:gcp": "npm run telemetry -- --target=gcp & npm start"
|
||||
},
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
"dist"
|
||||
],
|
||||
"config": {
|
||||
"sandboxImageUri": "gemini-cli-sandbox",
|
||||
"sandboximageName": "gemini-cli-sandbox"
|
||||
"sandboxImageUri": "gemini-cli-sandbox"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gemini-cli/core": "file:../core",
|
||||
|
|
|
@ -91,7 +91,7 @@ export async function loadSandboxConfig(
|
|||
const image =
|
||||
argv['sandbox-image'] ??
|
||||
process.env.GEMINI_SANDBOX_IMAGE ??
|
||||
packageJson?.config?.sandboximageName;
|
||||
packageJson?.config?.sandboxImageUri;
|
||||
|
||||
return command && image ? { command, image } : undefined;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import path from 'path';
|
|||
export type PackageJson = BasePackageJson & {
|
||||
config?: {
|
||||
sandboxImageUri?: string;
|
||||
sandboximageName?: string;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ if (sandboxCommand === 'sandbox-exec') {
|
|||
|
||||
console.log(`using ${sandboxCommand} for sandboxing`);
|
||||
|
||||
const baseImage = cliPkgJson.config.sandboximageName;
|
||||
const baseImage = cliPkgJson.config.sandboxImageUri;
|
||||
const customImage = argv.i;
|
||||
const baseDockerfile = 'Dockerfile';
|
||||
const customDockerfile = argv.f;
|
||||
|
|
|
@ -45,7 +45,6 @@ if (!cliPackageJson.config) {
|
|||
cliPackageJson.config = {};
|
||||
}
|
||||
cliPackageJson.config.sandboxImageUri = containerImageUri;
|
||||
cliPackageJson.config.sandboximageName = containerImageName;
|
||||
|
||||
// Remove 'prepublishOnly' from scripts if it exists
|
||||
if (cliPackageJson.scripts && cliPackageJson.scripts.prepublishOnly) {
|
||||
|
|
Loading…
Reference in New Issue