maps.chandlerswift.com/Makefile
Chandler Swift df10ed9739
Sync with --checksum to speed up over slow connection
It seems like timestamps update when rebuilding even though files don't
change; this ends up being significantly faster over a slow connection.
2026-04-16 20:22:53 -05:00

28 lines
911 B
Makefile

.PHONY: deploy
deploy: build
rsync --archive --verbose --delete dist/ root@bert:/srv/www/maps.chandlerswift.com/
.PHONY: deploy-remote
deploy-remote: build
rsync --archive --verbose --delete --checksum dist/ root@bert-jump:/srv/www/maps.chandlerswift.com/
.PHONY: clean
clean:
rm -r dist
.PHONY: build
build: # TODO: add get_data as a prereq
npm run build
# in theory I could use non-phony targets here, but then I'd have to be updating
# this file much more often. Maybe as things stabilize!
.PHONY: get_data
get_data:
@find ./ -name "get_data.*" \! -executable | grep . >/dev/null \
&& echo "Non-executable files found; consider running:" \
&& find ./ -name "get_data.*" \! -executable -exec echo " " chmod +x {} \; \
&& exit 1 \
|| true
@find ./ -name "get_data.*" -executable \
-exec sh -c 'cd $$(dirname {}) && echo processing {}; ./$$(basename {}) | sed --unbuffered "s/^/ /"' \;