Skip to content
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

Indicate commit hash on website #6

Closed
peterdesmet opened this issue Aug 23, 2017 · 5 comments
Closed

Indicate commit hash on website #6

peterdesmet opened this issue Aug 23, 2017 · 5 comments

Comments

@peterdesmet
Copy link
Member

For reference, it would be cool if the commit hash (in dev) and/or release version (in prod) on which the build is based is indicated in the footer of the website. Not sure yet how to do that, but noting it here as an idea.

@gkampmeier
Copy link
Collaborator

Is that needed if you are distinguishing the difference by the URL (see #5)? Or am I misunderstanding something?

@MattBlissett
Copy link
Member

git describe gives the tag (for a release) or tag+hash (otherwise).

It could go into settings*.py or wherever else might be appropriate.

@peterdesmet
Copy link
Member Author

@gkampmeier: the difference in URL is the difference between the development website (where everything can be considered a preview of what's to come) and the actual (production) website (which will often be a bit behind until the editor has approved stuff). The hash on the other had is just a handy reference to know on which commit the site is based: it could help to figure out "Hey, why am I not seeing these changes on the site yet? Oh right, it's based on this version." For the dev site we want it to always be based on the most recent commit, so if that's not the case it indicates a problem (which is useful to know)

@MattBlissett: it would have to be something that's automatically added. The settings are static (= manually updated). Will see later how that can be done.

@MattBlissett
Copy link
Member

Given a line like

GIT_HASH="unknown"

in settings-dev.py / settings-prod.py, I'd add a line to the build process like

perl -pi -e "s/GIT_HASH=.*/GIT_HASH=\""`git describe`\""/" settings-dev.py settings-prod.py

It needs one tag to start. The result would be something like

GIT_HASH="0.0.1-1-g9261a7e"

@peterdesmet
Copy link
Member Author

This is similar to the idea regarding showing the last modified date (#136). Closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@MattBlissett @peterdesmet @gkampmeier and others