Try this to fix the build? (More like the original)

This commit is contained in:
Matthew Kilgore
2025-06-29 20:28:35 -04:00
parent 6e3186a9de
commit cb9631c999
2 changed files with 4 additions and 4 deletions

View File

@@ -56,11 +56,11 @@ COPY --from=frontend-builder /app/.output/public ./app/api/static/public
# Use cache for Go build artifacts
RUN --mount=type=cache,target=/root/.cache/go-build \
if [ "$TARGETARCH" = "arm" ] || [ "$TARGETARCH" = "riscv64" ]; \
then CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
then echo "nodynamic" $TARGETOS $TARGETARCH; CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
-ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \
-tags nodynamic -o /go/bin/api -v ./app/api/*.go; \
else \
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
echo $TARGETOS $TARGETARCH; CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
-ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \
-o /go/bin/api -v ./app/api/*.go; \
fi