1

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.

duckbrain
  • 1,219
  • 1
  • 13
  • 26

1 Answers1

1

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

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • It seemed like it was going to be a bit much work to get this working across development machines, so I ended up just creating a script in the project that is run after I push to the server that uses git describe and git ls-files to generate a whole new manifest each time. Thanks for the help. – duckbrain Aug 04 '14 at 06:13