feat: add cross-platform thothctl

This commit is contained in:
2026-08-04 16:48:40 +02:00
parent e2264ee295
commit 853a151796
11 changed files with 730 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
FROM golang:1.24 AS build
WORKDIR /src/tools/thothctl
COPY tools/thothctl/go.mod tools/thothctl/go.sum ./
RUN go mod download
COPY tools/thothctl ./
RUN mkdir -p /out \
&& CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o /out/thothctl-windows-amd64.exe ./cmd/thothctl \
&& CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o /out/thothctl-darwin-amd64 ./cmd/thothctl \
&& CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags='-s -w' -o /out/thothctl-darwin-arm64 ./cmd/thothctl \
&& CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o /out/thothctl-linux-amd64 ./cmd/thothctl \
&& CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags='-s -w' -o /out/thothctl-linux-arm64 ./cmd/thothctl
FROM scratch AS export
COPY --from=build /out/ /