From 07d8a5db10bd4de70d25d7ab32b885b104794f0e Mon Sep 17 00:00:00 2001 From: maddalax Date: Sat, 21 Sep 2024 13:03:27 -0500 Subject: [PATCH] try again --- cli/htmgo/tasks/run/build.go | 5 +++-- htmgo-site/Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/htmgo/tasks/run/build.go b/cli/htmgo/tasks/run/build.go index 6c55e30..802a261 100644 --- a/cli/htmgo/tasks/run/build.go +++ b/cli/htmgo/tasks/run/build.go @@ -1,6 +1,7 @@ package run import ( + "fmt" "github.com/maddalax/htmgo/cli/htmgo/tasks/astgen" "github.com/maddalax/htmgo/cli/htmgo/tasks/copyassets" "github.com/maddalax/htmgo/cli/htmgo/tasks/css" @@ -18,8 +19,8 @@ func Build() { process.RunOrExit("rm -rf ./dist") process.RunOrExit("mkdir -p ./dist") - process.RunOrExit("env GOOS=linux GOARCH=amd64 go build -o ./dist/app-linux-amd64 .") + process.RunOrExit("env go build -o ./dist .") process.RunOrExit("go build -o ./dist/app .") - process.RunOrExit("echo \"Build successful\"") + fmt.Printf("Executable built at %s\n", process.GetPathRelativeToCwd("dist")) } diff --git a/htmgo-site/Dockerfile b/htmgo-site/Dockerfile index 25c2fdd..06ab0cb 100644 --- a/htmgo-site/Dockerfile +++ b/htmgo-site/Dockerfile @@ -16,8 +16,8 @@ RUN go mod download COPY . . # Build the Go binary for Linux -RUN GOPRIVATE=github.com/maddalax LOG_LEVEL=debug CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go run github.com/maddalax/htmgo/cli/htmgo@latest tailwind-cli -RUN GOPRIVATE=github.com/maddalax LOG_LEVEL=debug CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go run github.com/maddalax/htmgo/cli/htmgo@latest build +RUN GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest tailwind-cli +RUN GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build # Stage 2: Create the smallest possible image FROM gcr.io/distroless/base-debian11