mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 13:04:11 +00:00
chore: copy and adapt rivet release scripts for sandbox-agent
This commit is contained in:
parent
29b159ca20
commit
2a922ef562
14 changed files with 1284 additions and 1263 deletions
36
scripts/release/build-artifacts.ts
Normal file
36
scripts/release/build-artifacts.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import * as path from "node:path";
|
||||
import { $ } from "execa";
|
||||
import type { ReleaseOpts } from "./main";
|
||||
import { assertDirExists, PREFIX, uploadDirToReleases } from "./utils";
|
||||
|
||||
export async function buildJsArtifacts(opts: ReleaseOpts) {
|
||||
await buildAndUploadTypescriptSdk(opts);
|
||||
}
|
||||
|
||||
async function buildAndUploadTypescriptSdk(opts: ReleaseOpts) {
|
||||
console.log(`==> Building TypeScript SDK`);
|
||||
|
||||
// Build TypeScript SDK
|
||||
await $({
|
||||
stdio: "inherit",
|
||||
cwd: opts.root,
|
||||
})`pnpm --filter sandbox-agent build`;
|
||||
|
||||
console.log(`✅ TypeScript SDK built successfully`);
|
||||
|
||||
// Upload TypeScript SDK to R2
|
||||
console.log(`==> Uploading TypeScript SDK Artifacts`);
|
||||
|
||||
const sdkDistPath = path.resolve(
|
||||
opts.root,
|
||||
"sdks/typescript/dist",
|
||||
);
|
||||
|
||||
await assertDirExists(sdkDistPath);
|
||||
|
||||
// Upload to commit directory
|
||||
console.log(`Uploading TypeScript SDK to ${PREFIX}/${opts.commit}/typescript/`);
|
||||
await uploadDirToReleases(sdkDistPath, `${PREFIX}/${opts.commit}/typescript/`);
|
||||
|
||||
console.log(`✅ TypeScript SDK artifacts uploaded successfully`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue