repos / pgit

static site generator for git
git clone https://github.com/picosh/pgit.git

Eric Bower  ·  2025-03-23

Makefile

 1REV=$(shell git rev-parse --short HEAD)
 2PROJECT="git-pgit-$(REV)"
 3
 4smol:
 5	curl https://pico.sh/smol.css -o ./static/smol.css
 6.PHONY: smol
 7
 8clean:
 9	rm -rf ./public
10.PHONY: clean
11
12build:
13	go build -o pgit ./main.go
14.PHONY: build
15
16img:
17	docker build -t neurosnap/pgit:latest .
18.PHONY: img
19
20fmt:
21	go fmt ./...
22.PHONY: fmt
23
24lint:
25	golangci-lint run -E goimports -E godot --timeout 10m
26.PHONY: lint
27
28test:
29	go test ./...
30.PHONY: test
31
32static: build clean
33	./pgit \
34		--out ./public \
35		--label pgit \
36		--desc "static site generator for git" \
37		--clone-url "https://github.com/picosh/pgit.git" \
38		--home-url "https://git.erock.io" \
39		--theme "dracula" \
40		--revs main
41.PHONY:
42
43dev: static
44	rsync -rv ./public/* pgs.sh:/git-pgit-local
45.PHONY: dev