Skip to content

Commit

Permalink
make run server build the binary instead of outputting each run to a …
Browse files Browse the repository at this point in the history
…tmp file

ensure tailwind cli is v3 for now
  • Loading branch information
maddalax committed Jan 24, 2025
1 parent c406b5f commit d555e53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/htmgo/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
)

const version = "1.0.5"
const version = "1.0.6"

func main() {
needsSignals := true
Expand Down
2 changes: 1 addition & 1 deletion cli/htmgo/tasks/css/css.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func downloadTailwindCli() {
log.Fatal(fmt.Sprintf("Unsupported OS/ARCH: %s/%s", os, arch))
}
fileName := fmt.Sprintf(`tailwindcss-%s`, distro)
url := fmt.Sprintf(`https://github.com/tailwindlabs/tailwindcss/releases/latest/download/%s`, fileName)
url := fmt.Sprintf(`https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.16/%s`, fileName)

cmd := fmt.Sprintf(`curl -LO %s`, url)
process.Run(process.NewRawCommand("tailwind-cli-download", cmd, process.ExitOnError))
Expand Down
9 changes: 8 additions & 1 deletion cli/htmgo/tasks/run/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ func MakeBuildable() {
func Build() {
MakeBuildable()

process.RunOrExit(process.NewRawCommand("", "mkdir -p ./dist"))
_ = os.RemoveAll("./dist")

err := os.Mkdir("./dist", 0755)

if err != nil {
fmt.Println("Error creating dist directory", err)
os.Exit(1)
}

if os.Getenv("SKIP_GO_BUILD") != "1" {
process.RunOrExit(process.NewRawCommand("", fmt.Sprintf("go build -tags prod -o ./dist")))
Expand Down

0 comments on commit d555e53

Please sign in to comment.