Commit Graph
5 Commits
Author SHA1 Message Date
Julian Gutierrez Oschmann 6803c664e5 Move internal component packages out of /internal
Move them under cmd/<component>/internal as dictated by substrate's code
layout guidelines.
2026-06-15 13:00:19 -07:00
Tim Hockin 2b7c2634b1 Use pflag instead of Go's flag lib (#152)
Better to get ahead of this early.
2026-06-09 11:03:03 -07:00
Davanum Srinivas 94a5fff2c3 feat: stamp binaries with version/commit/build-date + --version flag
Adds internal/version with three vars (Version, Commit, BuildDate) set
via -ldflags -X at build time. When unset (e.g. plain `go build`
without LDFLAGS), runtime/debug.ReadBuildInfo() populates them from the
embedded vcs info so `go install`, `go run`, and ko-built images
(buildvcs is on by default) still produce something meaningful.

Wired through:
  - Makefile: VERSION / COMMIT / BUILD_DATE resolved from `git describe`
    / `git rev-parse` / `date`. LDFLAGS plumbed into every go-build and
    ko-build target (build-images, build-atectl, build-atenet,
    build-demos).
  - hack/install-ate.sh: untouched here — ko apply / resolve don't
    accept --ldflags, and ko's buildvcs embedding gives Commit +
    BuildDate automatically through runtime/debug.ReadBuildInfo() in
    the version package's init() fallback.

All six binaries respond to `--version`:
  - kubectl-ate and atenet (cobra): rootCmd.Version = version.String()
  - ateapi, atelet, ateom-gvisor, podcertcontroller (flag): explicit
    `-version` bool that prints and exits.

Sample output:
  kubectl-ate version 3b0a0d5 commit=3b0a0d5c2... \
      built=2026-05-26T14:16:53Z darwin/arm64

Closes the "kubectl-ate --version has nothing to print" gap; gives ops
a way to tell at a glance which commit a deployed substrate component
came from.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-06-02 16:34:18 -07:00
Tim Hockin 1ac5ba32a1 Fix boilerplate in go files 2026-05-31 19:45:36 -07:00
Julian Gutierrez Oschmann b1fe163fcf Run tools/reorg tool.
This commit was automatically generated by the tools/reorg tool.

```
go run ./tools/reorg
go generate ./...
bash benchmarking/locust/generate_protos.sh
```
2026-05-22 14:43:26 -07:00