Skip to content

Commit

Permalink
deb,rpm: use cobra generated completions
Browse files Browse the repository at this point in the history
Signed-off-by: Alano Terblanche <[email protected]>
  • Loading branch information
Benehiko committed Jan 22, 2025
1 parent 5029f6d commit 7b03403
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ override_dh_auto_build:
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh rootlesskit dynamic
# Build the CLI
cd /go/src/github.com/docker/cli && VERSION=$(VERSION) GITCOMMIT=$(CLI_GITCOMMIT) LDFLAGS='' GO_LINKMODE=dynamic ./scripts/build/binary && DISABLE_WARN_OUTSIDE_CONTAINER=1 LDFLAGS='' make manpages
cd /go/src/github.com/docker/cli \
&& VERSION=$(VERSION) GITCOMMIT=$(CLI_GITCOMMIT) LDFLAGS='' GO_LINKMODE=dynamic ./scripts/build/binary \
&& DISABLE_WARN_OUTSIDE_CONTAINER=1 LDFLAGS='' make manpages
&& build/docker completion bash > contrib/completion/bash/docker \
&& build/docker completion zsh > contrib/completion/zsh/_docker \
&& build/docker completion fish > contrib/completion/fish/docker.fish

# Build buildx plugin
cd /go/src/github.com/docker/buildx \
Expand Down
3 changes: 3 additions & 0 deletions rpm/SPECS/docker-ce-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ rm -f /go/src/github.com/docker/cli
ln -snf ${RPM_BUILD_DIR}/src/cli /go/src/github.com/docker/cli
pushd /go/src/github.com/docker/cli
VERSION=%{_origversion} GITCOMMIT=%{_gitcommit_cli} GO_LINKMODE=dynamic ./scripts/build/binary && DISABLE_WARN_OUTSIDE_CONTAINER=1 make manpages # cli
build/docker completion bash > contrib/completion/bash/docker
build/docker completion zsh > contrib/completion/zsh/_docker
build/docker completion fish > contrib/completion/fish/docker.fish
popd

%check
Expand Down

0 comments on commit 7b03403

Please sign in to comment.