-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (43 loc) · 1.23 KB
/
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
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
# Variables
TAILWIND_INPUT := internal/assets/css/main.css
TAILWIND_OUTPUT := internal/assets/css/main.min.css
# Install dependencies
deps:
go get ./...
# Seed database
seed:
go run cmd/seed/main.go
generate:
go generate ./... && templ generate
# Apply database migrations (up)
migrate-up:
go run cmd/migrate/main.go up
# Upgrade iota-sdk version && push
release:
go get github.com/iota-uz/iota-sdk@main && git add . && git commit -m "Upgrade iota-sdk version" && git push
# Downgrade database migrations (down)
migrate-down:
go run cmd/migrate/main.go down
# Run PostgreSQL
localdb:
docker compose -f compose.dev.yml up db
clear-localdb:
rm -rf postgres-data/
# Compile TailwindCSS (with watch)
css-watch:
tailwindcss -c tailwind.config.js -i $(TAILWIND_INPUT) -o $(TAILWIND_OUTPUT) --minify --watch
# Compile TailwindCSS (without watch)
css:
tailwindcss -c tailwind.config.js -i $(TAILWIND_INPUT) -o $(TAILWIND_OUTPUT) --minify
# Run linter
lint:
golangci-lint run ./...
# Clean build artifacts
clean:
rm -rf $(TAILWIND_OUTPUT)
# Upgrade iota-sdk version
upgrade-sdk:
chmod +x upgrade.sh && ./upgrade.sh
# Full setup
setup: deps migrate-up css lint
.PHONY: deps localdb migrate-up migrate-down dev css-watch css lint clean setup