devbox icon indicating copy to clipboard operation
devbox copied to clipboard

Add ability to update git-based project

Open jeffgran opened this issue 6 years ago • 3 comments

~~I moved the new command under a new project subcommand so that we could have more commands for working with projects grouped under that subcommand.~~

~~So instead of ~~

$ devbox new <NAME>

~~We have~~

$ devbox project new <NAME>

~~and~~

$ devbox project update <NAME>

~~Currently my version of the update command requires the git url to be passed again since we don't save it anywhere during the new command. I think it would be nice to make it optional, and reuse an existing url that we stash somewhere during new. I think we'd still have to always have the option, for existing projects that didn't have it saved, and I also think we'd want to have some way of updating the git url of an existing project in case you want to change it to a different branch or something. Maybe devbox project config --git <url> or something.~~

Adds a new renew command that re-generates (nay, copies/updates) a project config from a git repository so that existing projects can be updated. It requires passing the git url again since it is not stored anywhere.

(Fixes #3)

jeffgran avatar Oct 24 '19 21:10 jeffgran

Other commands like devbox start and devbox build select projects through a -p flag, why not follow this here with a devbox update -p <project> command? They also read the default project from DEVBOX_PROJECT env var, which would be a nice to have for this new command.

In my mind everything would be thrown under the project umbrella since I can't recall a command that is not project related 🤔 Even something like logs would have an implicit devbox (project) logs in my mind 😆

w-sanches avatar Jan 03 '20 14:01 w-sanches

@w-sanches that's a great point. One problem with using devbox update -p <project> is that the devbox update command already exists and is for updating a service within a project. I don't think I want to shoehorn both things to use the same update command even if it could be done with a flag or something. Maybe I'll just have to come up with a different name. Maybe devbox renew which echoes devbox new?

jeffgran avatar Jan 09 '20 20:01 jeffgran

Updated.

jeffgran avatar Jan 09 '20 23:01 jeffgran