-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put deployed commit into footer #51
Comments
Could we use the ident filter documented in gitattributes(5). PoC inc. |
Proof of concept for raumzeitlabor#51 Someone should fix the layout ;)
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). |
Our first approach for #51 always modified the jekyll template to contain the latest git commit SHA. The disadvantage is that we always modify all files, even if only a subset actually changed. This means Travis always deploys all affected HTML files with each build. This commit instead writes the version information into a separate file called CHANGELOG.json that will be fetched on demand by the browser as soon as the user views the footer. This reduces the files required to be updated on premium and is very conservative in terms of bandwidth. I was initially afraid to break /bilder where we are also using a waypoint on the footer. It does however seem to work fine. closes #51
Our first approach for #51 always modified the jekyll template to contain the latest git commit SHA. The disadvantage is that we always modify all files, even if only a subset actually changed. This means Travis always deploys all affected HTML files with each build. This commit instead writes the version information into a separate file called CHANGELOG.json that will be fetched on demand by the browser as soon as the user views the footer. This reduces the files required to be updated on premium and is very conservative in terms of bandwidth. I was initially afraid to break /bilder where we are also using a waypoint on the footer. It does however seem to work fine. closes #51
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 alsogrunt-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.
The text was updated successfully, but these errors were encountered: