Skip to content

Commit

Permalink
Merge pull request #968 from posit-dev/mm-fix-empty-target-name
Browse files Browse the repository at this point in the history
Set target name in CLI before deploying
  • Loading branch information
mmarchetti authored Feb 12, 2024
2 parents 860392b + fffb857 commit 8fd2cf9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions cmd/publisher/commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func (cmd *DeployCmd) Run(args *cli_types.CommonArgs, ctx *cli_types.CLIContext)
if err != nil {
return err
}
stateStore.TargetName = cmd.SaveName
fmt.Printf("Deploy to server %s using account %s and configuration %s, creating deployment %s\n",
stateStore.Account.URL,
stateStore.Account.Name,
Expand Down
2 changes: 0 additions & 2 deletions internal/publish/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ func (p *defaultPublisher) createDeploymentRecord(
}
}
p.TargetName = p.SaveName
} else if p.TargetName == "" {
p.TargetName = string(contentID)
}
return p.writeDeploymentRecord(log)
}
Expand Down

0 comments on commit 8fd2cf9

Please sign in to comment.