From 95dcd115db54bdb9622b38f818a5fb435ed328be Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Tue, 24 Feb 2026 16:59:34 +1100 Subject: [PATCH] feat: include cachew CLI in Docker container --- Justfile | 16 ++++++++++------ docker/Dockerfile | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Justfile b/Justfile index 7681423..d66ffe8 100644 --- a/Justfile +++ b/Justfile @@ -39,13 +39,17 @@ fmt: # Build for current platform build GOOS=(GOOS) GOARCH=(GOARCH): #!/usr/bin/env bash + set -euo pipefail mkdir -p {{ RELEASE }} - CGO_ENABLED=0 GOOS={{ GOOS }} GOARCH={{ GOARCH }} \ - go build -trimpath -o {{ RELEASE }}/cachewd-{{ GOOS }}-{{ GOARCH }} \ - -ldflags "-s -w -X main.version={{ VERSION }} -X main.gitCommit={{ GIT_COMMIT }}" \ - ./cmd/cachewd - test "{{ GOOS }}-{{ GOARCH }}" = "$(go env GOOS)-$(go env GOARCH)" && (cd {{ RELEASE }} && ln -sf cachewd-{{ GOOS }}-{{ GOARCH }} cachewd) - echo "✓ Built {{ RELEASE }}/cachewd-{{ GOOS }}-{{ GOARCH }}" + for binary in cachew cachewd; do + echo "⏲ Building dist/$binary-{{ GOOS }}-{{ GOARCH }}" + CGO_ENABLED=0 GOOS={{ GOOS }} GOARCH={{ GOARCH }} \ + go build -trimpath -o {{ RELEASE }}/${binary}-{{ GOOS }}-{{ GOARCH }} \ + -ldflags "-s -w -X main.version={{ VERSION }} -X main.gitCommit={{ GIT_COMMIT }}" \ + ./cmd/${binary} + test "{{ GOOS }}-{{ GOARCH }}" = "$(go env GOOS)-$(go env GOARCH)" && (cd {{ RELEASE }} && ln -sf ${binary}-{{ GOOS }}-{{ GOARCH }} ${binary}) + echo "✓ Done" + done # Build all platforms build-all: diff --git a/docker/Dockerfile b/docker/Dockerfile index dfe25cb..e7bfea1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,6 +15,7 @@ WORKDIR /app # Copy pre-built binary from host (built by Justfile) COPY dist/cachewd-linux-${TARGETARCH} /usr/local/bin/cachewd +COPY dist/cachew-linux-${TARGETARCH} /usr/local/bin/cachew # Copy default configuration file COPY cachew.hcl /app/cachew.hcl