-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (39 loc) · 1.04 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
# 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
migrate:
go run cmd/migrate/main.go $(filter-out $@,$(MAKECMDGOALS))
# 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
# Prevents make from treating the argument as an undefined target
%:
@:
# Full setup
setup: deps migrate-up css lint
.PHONY: deps localdb migrate dev css-watch css lint clean setup