mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Changed all references from Trusted Builds to Automated Builds
* Updated docker images output * Deprecated docker images -t/--trusted option and replace with --automated * Changed *trusted variables to *automated * Changed added support for is_automated alongside deprecated is_trusted * Updated man pages, docs and completion * Updated API documentation Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
This commit is contained in:
@@ -1724,7 +1724,8 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
|
||||
func (cli *DockerCli) CmdSearch(args ...string) error {
|
||||
cmd := cli.Subcmd("search", "TERM", "Search the docker index for images")
|
||||
noTrunc := cmd.Bool([]string{"#notrunc", "-no-trunc"}, false, "Don't truncate output")
|
||||
trusted := cmd.Bool([]string{"t", "#trusted", "-trusted"}, false, "Only show trusted builds")
|
||||
trusted := cmd.Bool([]string{"#t", "#trusted", "#-trusted"}, false, "Only show trusted builds")
|
||||
automated := cmd.Bool([]string{"-automated"}, false, "Only show automated builds")
|
||||
stars := cmd.Int([]string{"s", "#stars", "-stars"}, 0, "Only displays with at least xxx stars")
|
||||
if err := cmd.Parse(args); err != nil {
|
||||
return nil
|
||||
@@ -1747,9 +1748,9 @@ func (cli *DockerCli) CmdSearch(args ...string) error {
|
||||
return err
|
||||
}
|
||||
w := tabwriter.NewWriter(cli.out, 10, 1, 3, ' ', 0)
|
||||
fmt.Fprintf(w, "NAME\tDESCRIPTION\tSTARS\tOFFICIAL\tTRUSTED\n")
|
||||
fmt.Fprintf(w, "NAME\tDESCRIPTION\tSTARS\tOFFICIAL\tAUTOMATED\n")
|
||||
for _, out := range outs.Data {
|
||||
if (*trusted && !out.GetBool("is_trusted")) || (*stars > out.GetInt("star_count")) {
|
||||
if ((*automated || *trusted) && (!out.GetBool("is_trusted") && !out.GetBool("is_automated"))) || (*stars > out.GetInt("star_count")) {
|
||||
continue
|
||||
}
|
||||
desc := strings.Replace(out.Get("description"), "\n", " ", -1)
|
||||
@@ -1763,7 +1764,7 @@ func (cli *DockerCli) CmdSearch(args ...string) error {
|
||||
|
||||
}
|
||||
fmt.Fprint(w, "\t")
|
||||
if out.GetBool("is_trusted") {
|
||||
if out.GetBool("is_automated") || out.GetBool("is_trusted") {
|
||||
fmt.Fprint(w, "[OK]")
|
||||
}
|
||||
fmt.Fprint(w, "\n")
|
||||
|
||||
Reference in New Issue
Block a user