Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oc adm catalog mirror updates: mac/windows, bundle image support, quay.io support #384

Merged
merged 6 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 14 additions & 4 deletions contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ __oc_contains_word()
__oc_handle_reply()
{
__oc_debug "${FUNCNAME[0]}"
local comp
case $cur in
-*)
if [[ $(type -t compopt) = "builtin" ]]; then
Expand All @@ -51,7 +52,9 @@ __oc_handle_reply()
else
allflags=("${flags[*]} ${two_word_flags[*]}")
fi
COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") )
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${allflags[*]}" -- "$cur")
if [[ $(type -t compopt) = "builtin" ]]; then
[[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
fi
Expand Down Expand Up @@ -101,10 +104,14 @@ __oc_handle_reply()
if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
completions+=("${must_have_one_flag[@]}")
fi
COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${completions[*]}" -- "$cur")

if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${noun_aliases[*]}" -- "$cur")
fi

if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
Expand Down Expand Up @@ -139,7 +146,7 @@ __oc_handle_filename_extension_flag()
__oc_handle_subdirs_in_dir_flag()
{
local dir="$1"
pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1
pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
}

__oc_handle_flag()
Expand Down Expand Up @@ -597,6 +604,9 @@ _oc_adm_catalog_mirror()
local_nonpersistent_flags+=("--insecure")
flags+=("--manifests-only")
local_nonpersistent_flags+=("--manifests-only")
flags+=("--max-components=")
two_word_flags+=("--max-components")
local_nonpersistent_flags+=("--max-components=")
flags+=("--max-per-registry=")
two_word_flags+=("--max-per-registry")
local_nonpersistent_flags+=("--max-per-registry=")
Expand Down
18 changes: 14 additions & 4 deletions contrib/completions/zsh/oc
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ __oc_contains_word()
__oc_handle_reply()
{
__oc_debug "${FUNCNAME[0]}"
local comp
ecordell marked this conversation as resolved.
Show resolved Hide resolved
case $cur in
-*)
if [[ $(type -t compopt) = "builtin" ]]; then
Expand All @@ -193,7 +194,9 @@ __oc_handle_reply()
else
allflags=("${flags[*]} ${two_word_flags[*]}")
fi
COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") )
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${allflags[*]}" -- "$cur")
if [[ $(type -t compopt) = "builtin" ]]; then
[[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
fi
Expand Down Expand Up @@ -243,10 +246,14 @@ __oc_handle_reply()
if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
completions+=("${must_have_one_flag[@]}")
fi
COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${completions[*]}" -- "$cur")

if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${noun_aliases[*]}" -- "$cur")
fi

if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
Expand Down Expand Up @@ -281,7 +288,7 @@ __oc_handle_filename_extension_flag()
__oc_handle_subdirs_in_dir_flag()
{
local dir="$1"
pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1
pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
}

__oc_handle_flag()
Expand Down Expand Up @@ -739,6 +746,9 @@ _oc_adm_catalog_mirror()
local_nonpersistent_flags+=("--insecure")
flags+=("--manifests-only")
local_nonpersistent_flags+=("--manifests-only")
flags+=("--max-components=")
two_word_flags+=("--max-components")
local_nonpersistent_flags+=("--max-components=")
flags+=("--max-per-registry=")
two_word_flags+=("--max-per-registry")
local_nonpersistent_flags+=("--max-per-registry=")
Expand Down
7 changes: 0 additions & 7 deletions deps.diff

This file was deleted.

28 changes: 20 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,37 @@ require (
github.com/AaronO/go-git-http v0.0.0-20161214145340-1d9485b3a98f
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd
github.com/RangelReale/osincli v0.0.0-20160924135400-fababb0555f2
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect
github.com/alexbrainman/sspi v0.0.0-20180613141037-e580b900e9f5
github.com/alicebob/sqlittle v1.4.0
github.com/apcera/gssapi v0.0.0-00010101000000-000000000000
github.com/aws/aws-sdk-go v1.28.2
github.com/bitly/go-simplejson v0.5.0 // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb // indirect
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
github.com/bugsnag/bugsnag-go v1.5.3 // indirect
github.com/bugsnag/panicwrap v1.2.0 // indirect
github.com/containers/image v0.0.0-00010101000000-000000000000
github.com/containers/storage v0.0.0-20190726081758-912de200380a // indirect
github.com/coreos/etcd v3.3.15+incompatible
github.com/davecgh/go-spew v1.1.1
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/docker v0.7.3-0.20190817195342-4760db040282
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce
github.com/docker/go-units v0.4.0
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7
github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1
github.com/fsnotify/fsnotify v1.4.7
github.com/fsouza/go-dockerclient v0.0.0-20171004212419-da3951ba2e9e
github.com/garyburd/redigo v1.6.0 // indirect
github.com/ghodss/yaml v1.0.0
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/gonum/diff v0.0.0-20181124234638-500114f11e71 // indirect
github.com/gonum/graph v0.0.0-20170401004347-50b27dea7ebb
github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2 // indirect
github.com/gonum/mathext v0.0.0-20181121095525-8a4bf007ea55 // indirect
github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b // indirect
github.com/google/go-cmp v0.4.0
github.com/gorilla/handlers v1.4.2 // indirect
github.com/mitchellh/go-wordwrap v1.0.0
github.com/moby/buildkit v0.0.0-20181107081847-c3a857e3fca0
github.com/mtrmac/gpgme v0.1.2 // indirect
Expand All @@ -37,17 +45,20 @@ require (
github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0
github.com/openshift/library-go v0.0.0-20200327125526-163b2f0d6264
github.com/operator-framework/operator-registry v1.5.11
github.com/pkg/errors v0.8.1
github.com/operator-framework/operator-registry v1.8.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.1.0
github.com/russross/blackfriday v1.5.2
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v0.0.6
github.com/spf13/pflag v1.0.5
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonschema v1.1.0 // indirect
github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 // indirect
github.com/yvasiyarov/gorelic v0.0.7 // indirect
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 // indirect
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
gopkg.in/ldap.v2 v2.5.1
k8s.io/api v0.18.0
Expand All @@ -57,9 +68,10 @@ require (
k8s.io/client-go v8.0.0+incompatible
k8s.io/component-base v0.18.0
k8s.io/klog v1.0.0
k8s.io/kubectl v0.0.0
k8s.io/kubectl v0.18.0
k8s.io/kubernetes v1.13.0
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89
rsc.io/letsencrypt v0.0.3 // indirect
sigs.k8s.io/yaml v1.2.0
)

Expand Down