mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-05 05:20:34 +00:00
Default distribution/component could be specified when creating repo. #12
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ func aptlyRepoShow(cmd *commander.Command, args []string) error {
|
||||
|
||||
fmt.Printf("Name: %s\n", repo.Name)
|
||||
fmt.Printf("Comment: %s\n", repo.Comment)
|
||||
fmt.Printf("Default Distribution: %s\n", repo.DefaultDistribution)
|
||||
fmt.Printf("Default Component: %s\n", repo.DefaultComponent)
|
||||
fmt.Printf("Number of packages: %d\n", repo.NumPackages())
|
||||
|
||||
withPackages := cmd.Flag.Lookup("with-packages").Value.Get().(bool)
|
||||
|
||||
Reference in New Issue
Block a user