Skip to content

Commit 2cc738f

Browse files
committed
wip: zen
1 parent 71b2069 commit 2cc738f

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/console/core/script/promote-limits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if (!stage) throw new Error("Stage is required")
1010
const root = path.resolve(process.cwd(), "..", "..", "..")
1111

1212
// read the secret
13-
const ret = await $`bun sst secret list`.cwd(root).text()
13+
const ret = await $`bun sst secret list --stage frank`.cwd(root).text()
1414
const lines = ret.split("\n")
1515
const value = lines.find((line) => line.startsWith("ZEN_LIMITS"))?.split("=")[1]
1616
if (!value) throw new Error("ZEN_LIMITS not found")

packages/console/core/script/promote-models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const root = path.resolve(process.cwd(), "..", "..", "..")
1212
const PARTS = 30
1313

1414
// read the secret
15-
const ret = await $`bun sst secret list`.cwd(root).text()
15+
const ret = await $`bun sst secret list --stage frank`.cwd(root).text()
1616
const lines = ret.split("\n")
1717
const values = Array.from({ length: PARTS }, (_, i) => {
1818
const value = lines

packages/console/core/script/update-limits.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import os from "os"
66
import { Subscription } from "../src/subscription"
77

88
const root = path.resolve(process.cwd(), "..", "..", "..")
9-
const secrets = await $`bun sst secret list`.cwd(root).text()
9+
const secrets = await $`bun sst secret list --stage frank`.cwd(root).text()
1010

1111
// read value
1212
const lines = secrets.split("\n")
@@ -25,4 +25,4 @@ const newValue = JSON.stringify(JSON.parse(await tempFile.text()))
2525
Subscription.validate(JSON.parse(newValue))
2626

2727
// update the secret
28-
await $`bun sst secret set ZEN_LIMITS ${newValue}`
28+
await $`bun sst secret set ZEN_LIMITS ${newValue} --stage frank`.cwd(root)

packages/console/core/script/update-models.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import os from "os"
66
import { ZenData } from "../src/model"
77

88
const root = path.resolve(process.cwd(), "..", "..", "..")
9-
const models = await $`bun sst secret list`.cwd(root).text()
9+
const models = await $`bun sst secret list --stage frank`.cwd(root).text()
1010
const PARTS = 30
1111

1212
// read the line starting with "ZEN_MODELS"
@@ -40,4 +40,4 @@ const newValues = Array.from({ length: PARTS }, (_, i) =>
4040

4141
const envFile = Bun.file(path.join(os.tmpdir(), `models-${Date.now()}.env`))
4242
await envFile.write(newValues.map((v, i) => `ZEN_MODELS${i + 1}="${v.replace(/"/g, '\\"')}"`).join("\n"))
43-
await $`bun sst secret load ${envFile.name}`.cwd(root)
43+
await $`bun sst secret load ${envFile.name} --stage frank`.cwd(root)

0 commit comments

Comments
 (0)