Skip to content

Commit

Permalink
ci: generate client bundles for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Sep 3, 2024
1 parent a868e39 commit 99b638e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
FROM jdxcode/mise:latest AS build

ARG VERSION=development
ARG COMMIT=development
ARG COMMIT_SHA=development

ENV VERSION=${VERSION}
ENV COMMIT_SHA=${COMMIT}
ENV COMMIT_SHA=${COMMIT_SHA}

WORKDIR /app

Expand Down Expand Up @@ -34,6 +34,9 @@ RUN --mount=type=cache,target=${GOCACHE} \

RUN bun install --frozen-lockfile

# Verify environment variables
RUN echo "VERSION=${VERSION}" && echo "COMMIT_SHA=${COMMIT_SHA}"

# Copy the rest of the source code
COPY . .
RUN --mount=type=cache,target=${GOCACHE} ~/bin/task core:release:docker
Expand Down
5 changes: 5 additions & 0 deletions core/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ tasks:
# Centralise Docker release command into here for simpler maintenance instead of specifying
# within Dockerfile
release:docker:
deps: [generate]
cmds:
- go build -o ./bin/main -ldflags "-s -w -X main.Version=$VERSION -X main.Commit=$COMMIT_SHA" -trimpath -tags "no_duckdb_arrow" ./cmd/
- chmod +x ./bin/main
Expand All @@ -99,6 +100,7 @@ tasks:
CGO_ENABLED: "1"

release:linux:amd64:
deps: [generate]
cmds:
- go build -o ./bin/medama_linux_amd64 -ldflags "-s -w -X main.Version=$VERSION -X main.Commit=$COMMIT_SHA" -trimpath -tags "no_duckdb_arrow" ./cmd/
- chmod +x ./bin/medama_linux_amd64
Expand All @@ -109,6 +111,7 @@ tasks:
GOARCH: "amd64"

release:linux:arm64:
deps: [generate]
cmds:
- go build -o ./bin/medama_linux_arm64 -ldflags "-s -w -X main.Version=$VERSION -X main.Commit=$COMMIT_SHA" -trimpath -tags "no_duckdb_arrow" ./cmd/
- chmod +x ./bin/medama_linux_arm64
Expand All @@ -121,6 +124,7 @@ tasks:
GOARCH: "arm64"

release:darwin:amd64:
deps: [generate]
cmds:
- go build -o ./bin/medama_darwin_amd64 -ldflags "-s -w -X main.Version=$VERSION -X main.Commit=$COMMIT_SHA" -trimpath -tags "no_duckdb_arrow" ./cmd/
- chmod +x ./bin/medama_darwin_amd64
Expand All @@ -131,6 +135,7 @@ tasks:
GOARCH: "amd64"

release:darwin:arm64:
deps: [generate]
cmds:
- go build -o ./bin/medama_darwin_arm64 -ldflags "-s -w -X main.Version=$VERSION -X main.Commit=$COMMIT_SHA" -trimpath -tags "no_duckdb_arrow" ./cmd/
- chmod +x ./bin/medama_darwin_arm64
Expand Down

0 comments on commit 99b638e

Please sign in to comment.