all repos — website @ 05ba1a1e36136bf1febbea56ecb9662ed351899a

My website

Make `make deploy` do nothing unless sources are updated
Alan Pearce alan@alanpearce.eu
Sun, 09 Jul 2023 15:08:56 +0200
commit

05ba1a1e36136bf1febbea56ecb9662ed351899a

parent

f8a4c0497d145a597f6f7ec6f9bebc105fcd04f8

2 files changed, 8 insertions(+), 3 deletions(-)

jump to
M .gitignore.gitignore
@@ -1,5 +1,6 @@ /public
 /.deploystamp
 /.formatstamp
+/.compressstamp
 .direnv
 /result
M MakefileMakefile
@@ -21,6 +21,7 @@ @touch .formatstamp 
 clean:
 	rm -rf ./$(PREFIX)
+	rm -rf ./.*stamp
 
 to_compress := $(shell fd . $(PREFIX) --type=file -e html -e xml -e txt -e asc)
 brotli_files := $(patsubst %, %.br, $(to_compress))
@@ -63,14 +64,17 @@ ${PREFIX}/%.asc.zst: ${PREFIX}/%.asc
 	$(zstd) $< > $@
 
-compress: .formatstamp $(brotli_files) $(gzip_files) $(zstd_files)
+compress: .compressstamp
+
+.compressstamp: .formatstamp $(brotli_files) $(gzip_files) $(zstd_files)
+	@touch .compressstamp
 
 install: compress
 
 deploy: .deploystamp
 
-.deploystamp: build format compress
+.deploystamp: .compressstamp Caddyfile redis.Caddyfile Dockerfile fly.toml
 	fly deploy
 	@touch .deploystamp
 
-.PHONY: all clean build install deploy
+.PHONY: all clean build format compress install deploy