forked from haatos/goshipit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (22 loc) · 798 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.DEFAULT_GOAL := dev
GOOS := "linux"
GOARCH := "amd64"
deploy:
npx tailwindcss -o ./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/main cmd/server/main.go
scp -r 'content' $(user)@$(ip):/opt/goshipit/
scp -r 'generated' $(user)@$(ip):/opt/goshipit/
scp -r 'public' $(user)@$(ip):/opt/goshipit/
ssh $(user)@$(ip) "sudo service goshipit stop"
scp 'bin/main' $(user)@$(ip):/opt/goshipit/
ssh $(user)@$(ip) "sudo service goshipit start"
gen:
go run cmd/generate/main.go
tw:
@npx tailwindcss -i input.css -o public/static/css/tw.css --watch
test:
go version
dev: gen
@templ generate -watch -proxyport=7332 -proxy="http://localhost:8080" -open-browser=false -cmd="go run cmd/server/main.go"