add date hook to resolve the $DATE$ magic keyword
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.js filter=dateHook.sh
|
||||||
|
*.html filter=dateHook.sh
|
||||||
4
dateHook.sh
Executable file
4
dateHook.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
lastDate=$(git log --pretty=format:"%ad" -1)
|
||||||
|
sed -e "s/\$DATE[^\$]\$/$DATE: ${lastDate}$/"
|
||||||
Reference in New Issue
Block a user