-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (19 loc) · 811 Bytes
/
Makefile
File metadata and controls
24 lines (19 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.DEFAULT_GOAL := dev
GOOS := "linux"
GOARCH := "amd64"
deploy:
npx @tailwindcss/cli -i input.css -o ./internal/assets/public/static/css/tw.css --minify
go run cmd/generate/main.go
templ generate
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-s -w" -o bin/new-main cmd/server/main.go
scp 'bin/new-main' $(user)@$(ip):/opt/goshipit/
ssh $(user)@$(ip) "sudo service goshipit stop"
ssh $(user)@$(ip) "rm /opt/goshipit/main"
ssh $(user)@$(ip) "mv /opt/goshipit/new-main /opt/goshipit/main"
ssh $(user)@$(ip) "sudo service goshipit start"
gen:
go run cmd/generate/main.go
tw:
@npx @tailwindcss/cli -i input.css -o ./internal/assets/public/static/css/tw.css --watch
dev: gen
@templ generate -watch -proxyport=7332 -proxy="http://localhost:8080" -open-browser=false -cmd="go run cmd/server/main.go"