-
Notifications
You must be signed in to change notification settings - Fork 8
Automatically pull generator and dashboard before using #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cli/commands/dashboard.go
Outdated
} else { | ||
cmd.out.Error.Fatalf("Machine '%s' is not running.", cmd.machine.Name) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (cmd *Dashboard) LaunchDashboard(machine Machine) { | ||
func (cmd *Dashboard) LaunchDashboard(machine Machine, update bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is update
confusing here. True means don;t update, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I got that flipped. Will fix.
cli/commands/project_create.go
Outdated
args := []string{ | ||
"container", | ||
"run", | ||
"--rm", | ||
"-it", | ||
"-v", fmt.Sprintf("%s:/generated", cwd), | ||
"--name", | ||
generator_container_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we naming the container here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we name the Dashboard container. Since this might actually be done concurrently I'll remove that.
cli/commands/start.go
Outdated
@@ -112,7 +112,7 @@ func (cmd *Start) Run(c *cli.Context) error { | |||
|
|||
cmd.out.Verbose.Println("Launching Dashboard...") | |||
dash := Dashboard{BaseCommand{machine: cmd.machine, out: cmd.out}} | |||
dash.LaunchDashboard(cmd.machine) | |||
dash.LaunchDashboard(cmd.machine, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we update every time we start the VM, why would we want to provide the option to not update in the dashboard command. We should remove that and always update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought was that all containers we use should have an auto-update with the option to suppress.
cli/commands/dashboard.go
Outdated
|
||
// If there was an error it implies no previous instance of the image is available | ||
// or that docker operations failed and things will likely go wrong anyway. | ||
if err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be combined with the if err == nil above? its the same check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or it doesn;t matter if it exist locally or not. Just always pull it.
Fixes #49