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
Software version can be displayed in the UI or Admin interface #577
Comments
@emaestracci and @knopfler81 implemented this by relying on the last existing git tag. |
@Em-AK is there a commit for that? |
Yes here for the moment: https://github.com/knopfler81/openfoodnetwork/commit/7aa1a3f892bd56237457436f7c83e96e3408a8b7 |
Update here WildCodeSchool#3 |
@Em-AK what's needed to get the PR for this completed? |
I have used this gem(https://github.com/dtaniwaki/rack-dev-mark) to show different things for different envs. And it's very beautiful. |
Need someone to review the PR, if there is no comments, @sstead can stage it and have a test. Thanks |
Work was done in #1021 but a new approach was discussed on that PR that isn't yet implemented. Would be good to have someone pick this up and implement the described approach:
|
Can someone describe that other approach @oeoeaio @mkllnk ?
To me it looks overly complex. What's wrong with having a VERSION file in each deploy and reading the number from it? I know it's not as cool as a webhook |
Do you mean that the deployment process generates that file, but it's not tracked by Git? Sounds simple and it would do the job. Only in Aus production we would never see the tagged version name, because we deploy before we release. Not a big deal for me. |
exactly that @mkllnk. You get the tag and the sha from the git remote, for instance. @enricostano you're way more familiar with the deployment process than me. Does this sound good? |
Looking back at what we were proposing, I tend to agree. It would have been shiny, but maintaining webhooks to all servers wouldn't have been very pleasant. If we are going to update the version as part of deployment it would be good to only have to implement that in one place. @mkllnk, in an ideal world would we use |
I agree.
Yes, I agree on that as well. The whole Ansible vs Git deployment discussion is a bit bigger. I think we should do that at the forum, possible topic: "What would be the best way to deploy and update OFN?" Just to solve this issue, we could write a little shell script that writes the currently checked out version to a file. We can call that script from the Git hook and the Ansible playbook. Hm, it's actually a one liner: #!/bin/sh
git describe --tags > VERSION What do you think? |
Reopen for the upcoming devhack |
No one devhacked this and we have a workaround using Slack and Github Wiki. Bye bye. #gitcull |
Fixed by #11004. |
It would be very helpful for testers if there was an obvious way to know what version of OFN was running when looking at web pages, rather than having to use git versions to work this out.
Would best practice here be to add a
VERSION
file in the project root, that is updated on each major version update?@lin-d-hop any thoughts?
The text was updated successfully, but these errors were encountered: