git worktree setup with convex
i'm struggling to figure out how to have distinct convex cloud dev environments for each of my worktree during my dev phase. i have tried local dev also, but that doesnt seem to work either.
5 Replies
okay i think i fiugred out a method using by using convex local deployments after removing the CONVEX_DEPLOYMENT field. however, it seems this only works in interactive terminal mode. would be much easier if we can just pass in the deployment name using --name feature/123
created issue in https://github.com/get-convex/convex-js/issues/51
GitHub
Support custom deployment names via CLI arguments · Issue #51 · g...
Description Currently, when creating local Convex deployments, there's no way to specify a custom deployment name via CLI arguments. This feature would allow developers to pass deployment names...
i scripted a solution ~
before launching convex check if the file
.env.local
exists
if it doesnt create it and set
this starts it locally without a interactive terminallegend.
this isnt enough though ~ if works if this DEPLOYMENT was used before (it then gets persisted in ~/.convex)
but if this is the first time convex sees this deployment on this machine it also prompts for some stuff, and i found no way to bypass these prompts
for those i wrote an expect script https://phoenixnap.com/kb/linux-expect