Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ defaultPlatforms:
- linux/amd64
- linux/arm64

# ldflags for ko-built images ({{.Git.*}}/{{.Date}} templating). Version uses
# ShortCommit, not {{.Git.Tag}}: no release tag is reachable from HEAD yet.
defaultLdflags:
- -X github.com/agent-substrate/substrate/internal/version.Version={{.Git.ShortCommit}}
- -X github.com/agent-substrate/substrate/internal/version.Commit={{.Git.FullCommit}}
- -X github.com/agent-substrate/substrate/internal/version.BuildDate={{.Date}}

baseImageOverrides:
github.com/agent-substrate/substrate/demos/sandbox: alpine
github.com/agent-substrate/substrate/demos/agent-secret: alpine
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ KO := hack/run-tool.sh ko
BINDIR := bin/
ATECTL := $(BINDIR)/kubectl-ate

# Version stamping. Override on the make command line to pin
# (e.g. `make VERSION=v0.5.0 build`).
# Version stamping for the go-built binaries (kubectl-ate, atenet). ko images
# are stamped via .ko.yaml instead (`ko build` has no --ldflags flag).
# Override VERSION on the make line to pin (e.g. `make VERSION=v0.5.0 build`).
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
COMMIT ?= $(shell git rev-parse HEAD 2>/dev/null || echo unknown)
BUILD_DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
Expand All @@ -44,10 +45,10 @@ build: build-images build-atectl

.PHONY: build-images
build-images:
$(KO) build --ldflags "$(LDFLAGS)" ./cmd/ateapi
$(KO) build --ldflags "$(LDFLAGS)" ./cmd/atelet
$(KO) build --ldflags "$(LDFLAGS)" ./cmd/podcertcontroller
$(KO) build --ldflags "$(LDFLAGS)" ./cmd/atenet
$(KO) build ./cmd/ateapi
$(KO) build ./cmd/atelet
$(KO) build ./cmd/podcertcontroller
$(KO) build ./cmd/atenet

.PHONY: build-atectl
build-atectl:
Expand All @@ -59,7 +60,7 @@ build-atenet:

.PHONY: build-demos
build-demos:
$(KO) build --ldflags "$(LDFLAGS)" ./demos/counter
$(KO) build ./demos/counter

.PHONY: test
test:
Expand Down
Loading