repos / pgit

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

Eric Bower · 25 Apr 24

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
24static: build clean
25	./pgit \
26		--out ./public \
27		--label pgit \
28		--desc "static site generator for git" \
29		--clone-url "https://github.com/picosh/pgit.git" \
30		--home-url "https://git.erock.io" \
31		--theme "dracula" \
32		--revs main
33.PHONY:
34
35dev: static
36	rsync -rv ./public/* pgs.sh:/git-pgit-local
37.PHONY: dev