2023-01-06 20:56:00 +01:00
|
|
|
HEAD=$(shell git rev-parse --short HEAD)
|
2024-01-11 14:42:33 +01:00
|
|
|
CTNAME:=git.jmbit.de/jmb/www-jmbit-de
|
|
|
|
|
2024-11-26 09:09:05 +01:00
|
|
|
all: hugo webserver
|
2024-01-11 14:42:33 +01:00
|
|
|
|
2022-12-29 19:13:21 +01:00
|
|
|
dev:
|
2024-12-20 13:30:56 +01:00
|
|
|
cd hugo && hugo server -D
|
2024-01-11 14:42:33 +01:00
|
|
|
|
2023-01-29 19:12:57 +01:00
|
|
|
hugo:
|
2024-12-20 13:30:56 +01:00
|
|
|
cd hugo && hugo
|
2024-01-11 14:42:33 +01:00
|
|
|
|
|
|
|
webserver:
|
2024-12-20 13:30:56 +01:00
|
|
|
templ generate .
|
|
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o www .
|
2024-01-11 14:42:33 +01:00
|
|
|
|
2022-12-29 19:13:21 +01:00
|
|
|
container:
|
2024-01-11 14:42:33 +01:00
|
|
|
podman build -t $(CTNAME):latest -t $(CTNAME):$(HEAD) .
|
2023-08-03 11:13:56 +02:00
|
|
|
|
2024-01-11 14:42:33 +01:00
|
|
|
run:
|
|
|
|
podman run --rm -p8080:80 $(CTNAME)
|
2022-12-29 19:13:21 +01:00
|
|
|
|
2023-01-06 20:56:00 +01:00
|
|
|
clean:
|
2024-12-20 13:30:56 +01:00
|
|
|
rm -rf hugo/public
|
|
|
|
rm -f www
|
2023-01-06 20:56:00 +01:00
|
|
|
|
2024-12-20 13:30:56 +01:00
|
|
|
.PHONY: all dev hugo webserver container run clean
|