Add a Makefile target that commits an updated Nethack logfile

This commit is contained in:
Eryn Wells 2023-01-10 16:16:53 -08:00
parent 97c92d209d
commit e8e0a35064

View file

@ -20,11 +20,16 @@ deploy: site
@echo "Deploying to $(DEPLOY_LOCATION)"
rsync -avz --no-times --no-perms --delete public/ $(DEPLOY_LOCATION)
nethack: $(NETHACK_LOGFILE)
nethack: nethack-logfile nethack-commit
nethack-logfile: $(NETHACK_LOGFILE)
ifeq (,$(wildcard $<))
@echo "Importing Nethack logfile from $(NETHACK_LOGFILE)"
scripts/import-nethack-logfile.py -o $(NETHACK_LOGFILE_DATA_FILE) $<
endif
nethack-commit: $(NETHACK_LOGFILE_DATA_FILE)
if ! git diff --quiet $<; then git commit -m "Update Nethack logfile for $(HOSTNAME)" -- $<; fi
clean:
rm -rf public/