Skip to content

Commit

Permalink
Merge pull request #8534 from Luap99/revert-Luap99-cobra-vendor
Browse files Browse the repository at this point in the history
Revert the custom cobra vendor
  • Loading branch information
openshift-merge-robot committed Dec 1, 2020
2 parents 737e1d1 + 3d4a0e4 commit 4b5cb7b
Show file tree
Hide file tree
Showing 9 changed files with 623 additions and 432 deletions.
17 changes: 0 additions & 17 deletions Makefile
Expand Up @@ -460,15 +460,6 @@ changelog: ## Generate changelog
$(shell cat $(TMPFILE) >> changelog.txt)
$(shell rm $(TMPFILE))

completions: binaries
install ${SELINUXOPT} -d -m 755 completions/{bash,zsh,fish}
./bin/podman completion bash --no-desc -f completions/bash/podman
./bin/podman-remote completion bash --no-desc -f completions/bash/podman-remote
./bin/podman completion zsh -f completions/zsh/_podman
./bin/podman-remote completion zsh -f completions/zsh/_podman-remote
./bin/podman completion fish -f completions/fish/podman.fish
./bin/podman-remote completion fish -f completions/fish/podman-remote.fish

.PHONY: install
install: .gopathok install.bin install.remote install.man install.cni install.systemd ## Install binaries to system locations

Expand Down Expand Up @@ -620,14 +611,6 @@ install.libseccomp.sudo:
.PHONY: validate.completions
validate.completions: SHELL:=/usr/bin/env bash # Set shell to bash for this target
validate.completions:
# Check that nobody has manually edited the completion scripts
# If this check fails run make completions to restore the correct scripts
diff completions/bash/podman <(./bin/podman completion --no-desc bash)
diff completions/zsh/_podman <(./bin/podman completion zsh)
diff completions/fish/podman.fish <(./bin/podman completion fish)
diff completions/bash/podman-remote <(./bin/podman-remote completion --no-desc bash)
diff completions/zsh/_podman-remote <(./bin/podman-remote completion zsh)
diff completions/fish/podman-remote.fish <(./bin/podman-remote completion fish)
# Check if the files can be loaded by the shell
. completions/bash/podman
if [ -x /bin/zsh ]; then /bin/zsh completions/zsh/_podman; fi
Expand Down
6 changes: 1 addition & 5 deletions cmd/podman/completion/completion.go
Expand Up @@ -67,11 +67,7 @@ func completion(cmd *cobra.Command, args []string) error {
var err error
switch args[0] {
case "bash":
if noDesc {
err = cmd.Root().GenBashCompletion(w)
} else {
err = cmd.Root().GenBashCompletionWithDesc(w)
}
err = cmd.Root().GenBashCompletion(w)
case "zsh":
if noDesc {
err = cmd.Root().GenZshCompletionNoDesc(w)
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Expand Up @@ -74,5 +74,3 @@ require (
)

replace github.com/cri-o/ocicni => github.com/cri-o/ocicni v0.2.1-0.20201109200316-afdc16ba66df

replace github.com/spf13/cobra => github.com/Luap99/cobra v1.0.1-0.20201110155035-83a59186c706
5 changes: 3 additions & 2 deletions go.sum
Expand Up @@ -20,8 +20,6 @@ github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Luap99/cobra v1.0.1-0.20201110155035-83a59186c706 h1:KcMtguD/NlxB4c08lzc91o5by51Sf+Ec5+1Yv9Wqvbk=
github.com/Luap99/cobra v1.0.1-0.20201110155035-83a59186c706/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873 h1:93nQ7k53GjoMQ07HVP8g6Zj1fQZDDj7Xy2VkNNtvX8o=
Expand Down Expand Up @@ -500,6 +498,9 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
Expand Down

0 comments on commit 4b5cb7b

Please sign in to comment.