raumzeitlabor/rzl-homepage

Put deployed commit into footer

elsbrock opened this issue · 2 comments

Not sure how to do this best. I thought about either modifying the template (replacing a placeholder) or creating a CHANGELOG.json in dist which we could then get via AJAX.

I had a look at grunt-git-log-json which requires the usage of tags for each deployed version. There is also grunt-git-describe which does not natively support writing to files.

I think we only need the latest commit SHA. We could also do this via Travis, but I think it would be really nice if we could keep the local build process as equal as possible.

Could we use the ident filter documented in gitattributes(5). PoC inc.

A disadvantage of the current way is that it modifies all files, therefore rsyncing all files which each build to premium.

Maybe it's better to either write the commit to a separate JSON files and getting that via AJAX as originally proposed, or create a separate page. The AJAX request could be done on-demand (e.g. as soon as bottom of page is visible).