diff --git a/Makefile b/Makefile index b1d5628..836d640 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ TAGS := remote,exclude_graphdriver_btrfs,containers_image_openpgp OS ?= $(shell go env GOOS) ARCH ?= $(shell go env GOARCH) -.PHONY: all build bin images test vet lint fmt pre-commit clean completions rpm rpm-package patch minor major _tag +.PHONY: all build bin images test vet lint fmt pre-commit clean rpm rpm-package patch minor major _tag all: build @@ -41,14 +41,7 @@ pre-commit: clean: rm -rf $(DIST) -# Generate bash/zsh/fish completions into dist/completions. -completions: bin - @mkdir -p $(DIST)/completions - $(DIST)/$(BINARY) completion bash > $(DIST)/completions/$(BINARY).bash - $(DIST)/$(BINARY) completion zsh > $(DIST)/completions/_$(BINARY) - $(DIST)/$(BINARY) completion fish > $(DIST)/completions/$(BINARY).fish - -# Build the binary then package it (with completions) into an RPM via nfpm. +# Build the binary then package it into an RPM via nfpm. rpm: bin rpm-package # Package an already-built binary into an RPM (used by CI after the build step). diff --git a/packaging/nfpm.yaml b/packaging/nfpm.yaml index 4f525a8..e938f76 100644 --- a/packaging/nfpm.yaml +++ b/packaging/nfpm.yaml @@ -21,15 +21,3 @@ contents: dst: /usr/share/agent-sandbox/allowed-hosts file_info: mode: 0644 - - src: dist/completions/agent-sandbox.bash - dst: /usr/share/bash-completion/completions/agent-sandbox - file_info: - mode: 0644 - - src: dist/completions/_agent-sandbox - dst: /usr/share/zsh/site-functions/_agent-sandbox - file_info: - mode: 0644 - - src: dist/completions/agent-sandbox.fish - dst: /usr/share/fish/vendor_completions.d/agent-sandbox.fish - file_info: - mode: 0644 diff --git a/scripts/build-rpm.sh b/scripts/build-rpm.sh index aff8996..e6b65ec 100755 --- a/scripts/build-rpm.sh +++ b/scripts/build-rpm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Package the (already built) agent-sandbox binary, its shell completions and -# the default allowlist into an RPM with nfpm. +# Package the (already built) agent-sandbox binary and the default +# allowlist into an RPM with nfpm. # Usage: scripts/build-rpm.sh [version] (defaults to $CI_COMMIT_TAG) set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")/.." @@ -15,11 +15,6 @@ if [[ ! -f $DIST/$BINARY ]]; then exit 1 fi -mkdir -p "$DIST/completions" -"./$DIST/$BINARY" completion bash >"$DIST/completions/$BINARY.bash" -"./$DIST/$BINARY" completion zsh >"$DIST/completions/_$BINARY" -"./$DIST/$BINARY" completion fish >"$DIST/completions/$BINARY.fish" - export PACKAGE_VERSION="${VERSION#v}" envsubst "$DIST/nfpm.yaml" nfpm pkg --config "$DIST/nfpm.yaml" --target "$DIST" --packager rpm