Compare commits
1 Commits
c77c491b64
...
66dbcfc751
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66dbcfc751 |
@@ -10,9 +10,10 @@ COPY . .
|
||||
RUN go tool templ generate
|
||||
RUN go tool gotailwind -i assets/css/input.css -o assets/css/output.css --minify
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
MODULE=$(head -1 go.mod | awk '{print $2}') && \
|
||||
VERSION=$(git describe --tags --always) && \
|
||||
COMMIT=$(git rev-parse --short HEAD) && \
|
||||
CGO_ENABLED=0 go build -ldflags="-s -X github.com/ryanhamamura/games/version.Version=$VERSION -X github.com/ryanhamamura/games/version.Commit=$COMMIT" -o /bin/games .
|
||||
CGO_ENABLED=0 go build -ldflags="-s -X $MODULE/version.Version=$VERSION -X $MODULE/version.Commit=$COMMIT" -o /bin/games .
|
||||
RUN upx -9 -k /bin/games
|
||||
|
||||
FROM scratch
|
||||
|
||||
Reference in New Issue
Block a user