Conversation
As per the UX study we remove these two flags to make init simpler. The maintainer is populated with the name of the current user. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
The user needs to explicitly give the path to the docker-compose file that they want to base the app on. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
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.
LGTM
I like code being removed :P
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.
LGTM
@@ -76,25 +77,30 @@ func TestInit(t *testing.T) { | |||
cmd, cleanup := dockerCli.createTestCmd() | |||
defer cleanup() | |||
|
|||
userData, _ := user.Current() | |||
currentUser := "" | |||
if userData != 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.
nit:
var currentUser string
if userData, _ := user.Current(); userData != nil{
currentUser = userData.Username
}
) | ||
|
||
func initCmd(dockerCli command.Cli) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "init APP_NAME [--compose-file COMPOSE_FILE] [--description DESCRIPTION] [--maintainer NAME:EMAIL ...] [OPTIONS]", | ||
Use: "init APP_NAME [--compose-file COMPOSE_FILE] [OPTIONS]", |
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.
Could you rename APP_NAME with APP_DEFINITION ?
assert.NilError(t, err) | ||
|
||
data := `# Version of the application | ||
userData, _ := user.Current() |
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.
Same pattern here 😅
Argh, I already merged it. My bad 😢 |
- What I did
Made UX changes to the
init
subcommand:- How I did it
Removed a bunch of code.
- How to verify it
Run
docker app init --help
, the flagsdescription
andmaintainer
should no longer be there.- Description for the changelog
Docker App doesn't implicitly select a docker-compose.yml file on init.
The flags
--description
and--maintainer
heve been removed.- A picture of a cute animal (not mandatory but encouraged)