make run server build the binary instead of outputting each run to a tmp file
ensure tailwind cli is v3 for now
This commit is contained in:
parent
c406b5f068
commit
d555e5337f
3 changed files with 10 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version = "1.0.5"
|
const version = "1.0.6"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
needsSignals := true
|
needsSignals := true
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ func downloadTailwindCli() {
|
||||||
log.Fatal(fmt.Sprintf("Unsupported OS/ARCH: %s/%s", os, arch))
|
log.Fatal(fmt.Sprintf("Unsupported OS/ARCH: %s/%s", os, arch))
|
||||||
}
|
}
|
||||||
fileName := fmt.Sprintf(`tailwindcss-%s`, distro)
|
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)
|
cmd := fmt.Sprintf(`curl -LO %s`, url)
|
||||||
process.Run(process.NewRawCommand("tailwind-cli-download", cmd, process.ExitOnError))
|
process.Run(process.NewRawCommand("tailwind-cli-download", cmd, process.ExitOnError))
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,14 @@ func MakeBuildable() {
|
||||||
func Build() {
|
func Build() {
|
||||||
MakeBuildable()
|
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" {
|
if os.Getenv("SKIP_GO_BUILD") != "1" {
|
||||||
process.RunOrExit(process.NewRawCommand("", fmt.Sprintf("go build -tags prod -o ./dist")))
|
process.RunOrExit(process.NewRawCommand("", fmt.Sprintf("go build -tags prod -o ./dist")))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue