www.nico.schottelius.org/Makefile

43 lines
1.4 KiB
Makefile
Raw Normal View History

DESTDIR=/home/users/nico/privat/rechner/netz/seiten/www.nico.schottelius.org/dst/
PUBDIR=tee.schottelius.org:/home/services/www/nico/www.nico.schottelius.org/www/
BROWSER=conkeror
IKIWIKI=ikiwiki
2024-10-11 14:22:48 +00:00
VERSION=$(shell git describe --always)
2024-10-11 15:24:54 +00:00
ARGOCD_HOME=$$HOME/vcs/k8s-config/cluster/p10/apps/templates/
2024-10-11 15:00:55 +00:00
ARGOCD_YAML=nicoweb.yaml
2024-10-11 15:17:46 +00:00
ARGOCD_APP=$(ARGOCD_HOME)/$(ARGOCD_YAML)
IMAGE_NAME=harbor.k8s.ungleich.ch/nico/www.nico.schottelius.org
2024-10-11 15:00:55 +00:00
2024-10-11 15:24:54 +00:00
all: argocd
2024-10-11 14:22:48 +00:00
2024-10-11 15:24:54 +00:00
gitpush:
git push --mirror
2024-10-11 15:24:54 +00:00
container: gitpush
2024-10-11 14:22:48 +00:00
docker build -t harbor.k8s.ungleich.ch/nico/www.nico.schottelius.org:$(VERSION) .
docker push harbor.k8s.ungleich.ch/nico/www.nico.schottelius.org:$(VERSION)
2024-10-11 15:24:54 +00:00
argocd: container
2024-10-11 15:17:46 +00:00
sed -i "s,$(IMAGE_NAME):.*,$(IMAGE_NAME):$(VERSION)," $(ARGOCD_APP)
2024-10-11 15:30:35 +00:00
cd $(ARGOCD_HOME) && git add $(ARGOCD_YAML) && git commit -m "Update www.nico.schottelius.org to $(VERSION)" $(ARGOCD_YAML) && git push
2024-10-11 14:22:48 +00:00
2024-10-11 15:24:54 +00:00
setup:
$(IKIWIKI) --refresh --setup ikiwiki.setup
lall:
$(IKIWIKI) --refresh --setup ikiwiki.setup --set destdir=../dst --set srcdir=. --set git_wrapper= --set git_wrappermode= --set gitorigin_branch= --set gitmaster_branch=
all-unfresh:
$(IKIWIKI) --setup ikiwiki.setup
lall-unfresh:
$(IKIWIKI) --setup ikiwiki.setup --set destdir=../dst --set srcdir=. --set git_wrapper= --set git_wrappermode= --set gitorigin_branch= --set gitmaster_branch=
view:
$(BROWSER) ${DESTDIR}/index.html
clean: all
rm -rf ${DESTDIR}