Skip to content

Commit

Permalink
fix: always store project-id in deno.json
Browse files Browse the repository at this point in the history
  • Loading branch information
arnauorriols committed Nov 28, 2023
1 parent 48b6a35 commit 756a79f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/subcommands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ async function deploy(opts: DeployOpts): Promise<void> {
} catch (e) {
error(e.message);
}
// opts.project is persisted in deno.json. We want to store the project id even if user provided
// project name to facilitate project renaming.
opts.project = project.id;
projectCreationSpinner.succeed(`Created new project '${opts.project}'.`);
wait({ text: "", indent: 3 }).start().info(
`You can configure the name, env vars, custom domains and more in https://dash.deno.com/projects/${project.name}/settings`,
Expand Down Expand Up @@ -298,6 +295,10 @@ async function deploy(opts: DeployOpts): Promise<void> {
case "success": {
const deploymentKind = opts.prod ? "Production" : "Preview";
deploySpinner!.succeed(`${deploymentKind} deployment complete.`);

// We want to store the project id even if user provided project name
// to facilitate project renaming.
opts.project = project.id;
await configFile.maybeWrite(opts.config, opts, opts.saveConfig);
console.log("\nView at:");
for (const { domain } of event.domainMappings) {
Expand Down

0 comments on commit 756a79f

Please sign in to comment.