mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-30 02:03:05 +00:00
fix(worktree): define devUrl/testUrl antes do runMigrate em provision (#479)
provision() chamava runMigrate(dir, devUrl, ...) com variáveis nunca definidas no escopo — 'devUrl is not defined' ao rodar pnpm worktree next --go. Derivadas dos bancos do env (mesmo formato de worktreeEnvFileContents).
This commit is contained in:
parent
8d0a571500
commit
3838406a30
1 changed files with 3 additions and 0 deletions
|
|
@ -239,6 +239,9 @@ const provision = async ({ dir, branch, issue, env, skipMigrate, mainRoot, purpo
|
||||||
const testDatabase = env.testDatabase
|
const testDatabase = env.testDatabase
|
||||||
await ensureDatabases([devDatabase, testDatabase])
|
await ensureDatabases([devDatabase, testDatabase])
|
||||||
|
|
||||||
|
const devUrl = `postgresql://teqo:teqo@localhost:5432/${devDatabase}`
|
||||||
|
const testUrl = `postgresql://teqo:teqo@localhost:5432/${testDatabase}`
|
||||||
|
|
||||||
const mainEnv = readMainEnv(mainRoot)
|
const mainEnv = readMainEnv(mainRoot)
|
||||||
const payloadSecret = mainEnv.PAYLOAD_SECRET ?? randomBytes(24).toString('hex')
|
const payloadSecret = mainEnv.PAYLOAD_SECRET ?? randomBytes(24).toString('hex')
|
||||||
const copy = (key) => (mainEnv[key] ? [`${key}=${mainEnv[key]}`] : [])
|
const copy = (key) => (mainEnv[key] ? [`${key}=${mainEnv[key]}`] : [])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue