www.nico.schottelius.org/Makefile

52 lines
1.6 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=ikiwikitest.sh
IKIWIKI=ikiwiki
2024-10-11 14:22:48 +00:00
VERSION=$(shell git describe --always)
2024-10-11 15:00:55 +00:00
ARGOCD_HOME=$HOME/vcs/k8s-config/cluster/p10/apps/templates/
ARGOCD_YAML=nicoweb.yaml
ARGOCD_APP=$ARGOCD_HOME/$ARGOCD_YAML
all: container
2024-10-11 14:22:48 +00:00
pub:
git push --mirror
2024-10-11 15:00:55 +00:00
setup:
$(IKIWIKI) --refresh --setup ikiwiki.setup
2024-10-11 14:22:48 +00:00
container:
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:00:55 +00:00
sed -i "s,harbor.k8s.ungleich.ch/nico/www.nico.schottelius.org:.*,harbor.k8s.ungleich.ch/nico/www.nico.schottelius.org:$(VERSION)" $(ARGOCD_APP)
cd $(ARGOCD_HOME) && git add $(ARGOCD_YAML) && git commit -m "Update www.nico.schottelius.org to $(VERSION)" && git push
2024-10-11 14:22:48 +00:00
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}
#public: ask public-f
#public-f: all
# find ${DESTDIR} -type f -exec chmod 0644 {} \;
# find ${DESTDIR} -type d -exec chmod 0755 {} \;
# rsync -av --delete ${DESTDIR} ${PUBDIR}
#ask:
# @echo "Press return to publish..."
# @read avariable
# git push --mirror