Repository navigation
Expand file tree
/
Copy pathJustfile
More file actions
61 lines (49 loc) · 1.63 KB
/
Copy pathJustfile
File metadata and controls
61 lines (49 loc) · 1.63 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
export YAFTI_EXEC_WRAPPER := "flatpak run org.mozilla.firefox --kiosk --new-instance %u"
default:
@just --list
# Run dev server with live template reloading
dev:
go tool templ generate --watch --cmd="env YAFTI_CONF=$PWD/yafti.yml go run ."
# Run with custom config file
run config="yafti.yml":
env YAFTI_CONF=$PWD/{{config}} go run .
# Build the application
build:
go build -o yafti-go
# Generate templ files
templ:
templ generate
# Same as templ but using GOPATH to find the binary
templ-gopath:
$(go env GOPATH)/bin/templ generate
# Run with bazzite config
bazzite:
env YAFTI_CONF=$PWD/yafti.yml go run .
# Build and run with bazzite config
bazzite-build:
go build -o yafti-go && env YAFTI_CONF=$PWD/yafti.yml ./yafti-go
# Clean build artifacts
clean:
rm -f yafti-go
# Install dependencies
deps:
go mod tidy
go install github.com/a-h/templ/cmd/templ@latest
# full clean and rebuild and deploy for bazzite example script
bazzite-full:
just clean
just bazzite-build
# Complete rebuild: clean, regenerate templates, build and run with yafti.yml
rebuild-all:
@echo "=== Cleaning build artifacts ==="
just clean
@echo "=== Removing generated templ files ==="
find ./ui -name "*_templ.go" -delete
@echo "=== Installing templ tool if needed ==="
go install github.com/a-h/templ/cmd/templ@latest
@echo "=== Regenerating templ files ==="
$(go env GOPATH)/bin/templ generate
@echo "=== Rebuilding application ==="
go build -o yafti-go
@echo "=== Running application with yafti.yml ==="
go tool templ generate --watch --cmd="env YAFTI_CONF=$PWD/yafti.yml go run ."