Default distribution/component could be specified when creating repo. #12

This commit is contained in:
Andrey Smirnov
2014-03-26 21:24:09 +04:00
parent 7f2f435e2d
commit 0f8f43b9f0
38 changed files with 113 additions and 49 deletions
+4
View File
@@ -15,6 +15,8 @@ func aptlyRepoCreate(cmd *commander.Command, args []string) error {
}
repo := debian.NewLocalRepo(args[0], cmd.Flag.Lookup("comment").Value.String())
repo.DefaultDistribution = cmd.Flag.Lookup("distribution").Value.String()
repo.DefaultComponent = cmd.Flag.Lookup("component").Value.String()
err = context.collectionFactory.LocalRepoCollection().Add(repo)
if err != nil {
@@ -43,6 +45,8 @@ Example:
}
cmd.Flag.String("comment", "", "any text that would be used to described local repository")
cmd.Flag.String("distribution", "", "default distribution when publishing")
cmd.Flag.String("component", "main", "default component when publishing")
return cmd
}