|
|
|
@ -24,6 +24,7 @@ import typer
|
|
|
|
|
|
|
|
|
|
from docker_tags_getter.config.headers_config import HeadersConfig
|
|
|
|
|
from docker_tags_getter.fetcher.api_fetcher import ApiFetcher
|
|
|
|
|
from docker_tags_getter.filters.tags_filter import TagsFilter
|
|
|
|
|
from docker_tags_getter.api.v2.repositories_api import RepositoriesAPI
|
|
|
|
|
from docker_tags_getter.api.v2.tags_api import TagsAPI
|
|
|
|
|
|
|
|
|
@ -42,6 +43,11 @@ def tags(
|
|
|
|
|
help="[b]The repository[/] is a uniq identification of [b]a project[/].",
|
|
|
|
|
show_default=False
|
|
|
|
|
),
|
|
|
|
|
filter: bool = typer.Option(
|
|
|
|
|
None, "--filter", "-f",
|
|
|
|
|
help="[b]The tags[/] will be filtered.",
|
|
|
|
|
show_default=False
|
|
|
|
|
),
|
|
|
|
|
):
|
|
|
|
|
"""
|
|
|
|
|
[green b]All tags[/] will be returned for the [yellow b]namespace[/].
|
|
|
|
@ -61,6 +67,13 @@ def tags(
|
|
|
|
|
|
|
|
|
|
tags = tags_api.get_list()
|
|
|
|
|
|
|
|
|
|
if filter:
|
|
|
|
|
if 'latest' in tags:
|
|
|
|
|
tags.remove('latest')
|
|
|
|
|
|
|
|
|
|
tags_filter = TagsFilter()
|
|
|
|
|
tags = tags_filter.filter_list(tags)
|
|
|
|
|
|
|
|
|
|
for tag in tags:
|
|
|
|
|
console.print(tag)
|
|
|
|
|
|
|
|
|
|