duckbrain
duckbrain

Reputation: 1279

Auto-Updated HTML Application Cache Manifest with Git

I want to be able to have my appcache automatically change whenever I pull a new commit on my server. HTML5 cache manifests are considered updated if there are any changes in the file at all. A common practice is to put a version number in a comment in the file to increment. I don't want to have to update it every time. I have gotten something with

CACHE MANIFEST
#GIT $Id$
...

In my appcache.manifest and

manifest.appcache ident 

In my .gitattributes I hoped that it would use the SHA1 from the commit, so it would be different every time, but it seems to only do one on the manifest file itself, which does not really help.

Is there a way to get Git it to insert a SHA1 of the whole project instead of just the single file? Thanks in advance.

Upvotes: 1

Views: 81

Answers (1)

VonC
VonC

Reputation: 1327784

You can try, as described in Git Attributes Keyword Expansion, the alternative method with content filter drivers:

http://git-scm.com/figures/18333fig0703-tn.png

As I described in "How do I add revision and build date to source?", you can call git describe --tags

Upvotes: 1

Related Questions