all repos — website @ 731d1c63dca1c8bf6d99e9c0f316f59595861ac8

My website

preserve file times when copying from static/
Alan Pearce alan@alanpearce.eu
Fri, 19 Apr 2024 07:30:27 +0200
commit

731d1c63dca1c8bf6d99e9c0f316f59595861ac8

parent

604e9342d92742022943feba62ce812d6ad1dc8f

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M cmd/build/build.gocmd/build/build.go
@@ -534,7 +534,9 @@ err = os.RemoveAll("public") 	if err != nil {
 		log.Panic(errors.Errorf("could not remove public directory: %v", err))
 	}
-	err = cp.Copy("static", "public", cp.Options{})
+	err = cp.Copy("static", "public", cp.Options{
+		PreserveTimes:     true,
+	})
 	if err != nil {
 		log.Panic(errors.Errorf("could not copy static files: %v", err))
 	}