From d4307d96ac087331c597bfde760f5b190d9678dc Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Tue, 7 Dec 2021 20:51:04 +0000 Subject: [PATCH] build: fix build artifacts in binary Signed-off-by: Ramkumar Chinchani --- Makefile | 12 ++++++------ README.md | 1 + pkg/cli/root.go | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f7fe3676..34311b77 100644 --- a/Makefile +++ b/Makefile @@ -11,19 +11,19 @@ OS ?= linux ARCH ?= amd64 .PHONY: all -all: swagger binary binary-minimal exporter-minimal debug test test-clean check +all: swagger binary binary-minimal binary-debug exporter-minimal test test-clean check .PHONY: binary-minimal binary-minimal: swagger - env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-minimal -tags minimal,containers_image_openpgp -v -trimpath -ldflags "-X github.com/project-zot/zot/pkg/api/config.Commit=${COMMIT} -X github.com/project-zot/zot/pkg/api/config.BinaryType=minimal -X github.com/project-zot/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot + env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-minimal -tags minimal,containers_image_openpgp -v -trimpath -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=minimal -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot .PHONY: binary binary: swagger - env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot -tags extended,containers_image_openpgp -v -trimpath -ldflags "-X github.com/project-zot/zot/pkg/api/config.Commit=${COMMIT} -X github.com/project-zot/zot/pkg/api/config.BinaryType=extended -X github.com/project-zot/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot + env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot -tags extended,containers_image_openpgp -v -trimpath -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=extended -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot -.PHONY: debug -debug: swagger - env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-debug -tags extended,containers_image_openpgp -v -gcflags all='-N -l' -ldflags "-X github.com/project-zot/zot/pkg/api/config.Commit=${COMMIT} -X github.com/project-zot/zot/pkg/api/config.BinaryType=extended -X github.com/project-zot/zot/pkg/api/config.GoVersion=${GO_VERSION}" ./cmd/zot +.PHONY: binary-debug +binary-debug: swagger + env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-debug -tags extended,containers_image_openpgp -v -gcflags all='-N -l' -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=extended -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION}" ./cmd/zot .PHONY: exporter-minimal exporter-minimal: swagger diff --git a/README.md b/README.md index 5b3c67b1..47ab305b 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ https://zotregistry.io * Supports container image signatures - [cosign](https://github.com/sigstore/cosign) and [notation](https://github.com/notaryproject/notation) * Supports [helm charts](https://helm.sh/docs/topics/registries/) * Behavior controlled via [configuration](./examples/README.md) +* Supports `amd64` (Intel, AMD, etc) and `arm64` (ARM servers, Raspberry PI 4, etc) architectures * Supports image deletion by tag * Currently suitable for on-prem deployments (e.g. colocated with Kubernetes) * Compatible with ecosystem tools such as [skopeo](#skopeo) and [cri-o](#cri-o) diff --git a/pkg/cli/root.go b/pkg/cli/root.go index c06e7daa..a7bccfb1 100644 --- a/pkg/cli/root.go +++ b/pkg/cli/root.go @@ -129,7 +129,7 @@ func NewRootCmd() *cobra.Command { Run: func(cmd *cobra.Command, args []string) { if showVersion { log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit). - Str("binary-type", config.BinaryType).Msg("version") + Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version") } _ = cmd.Usage() cmd.SilenceErrors = false