diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..92be8bb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.js filter=dateHook.sh +*.html filter=dateHook.sh diff --git a/dateHook.sh b/dateHook.sh new file mode 100755 index 0000000..a2f7979 --- /dev/null +++ b/dateHook.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +lastDate=$(git log --pretty=format:"%ad" -1) +sed -e "s/\$DATE[^\$]\$/$DATE: ${lastDate}$/"