Expose running version on CLI and Web#157
Conversation
4557f13 to
ce80411
Compare
src/Version.hs
Outdated
| -- Licensed under the Apache License, Version 2.0 (the "License"); | ||
| -- you may not use this file except in compliance with the License. | ||
| -- A copy of the License has been included in the root of the repository. | ||
| module Version (version) where |
There was a problem hiding this comment.
We can avoid this module, and thus remove one of the places we would now have to keep in-sync, by using the version :: Version export from the cabal-generated Paths_hoff module
There was a problem hiding this comment.
Note, from a different section of the cabal users guide:
If you decide to import the
Paths_pkgnamemodule then it must be listed in the other-modules field just like any other module in your package and on autogen-modules as the file is autogenerated.
There was a problem hiding this comment.
Don't forget to update package/check-version.sh
There was a problem hiding this comment.
Mmm... interesting... 🤔 Lemme try to do that.
There was a problem hiding this comment.
It worked. Great suggestion! 😄
|
@alex-mckenna I think I have addressed your comments 😁. Can you please review again? |
|
I will not merge this now. Since these changes are quite self-contained, it is a good candidate to test #137 for real after it is deployed soon. 🚂 🚋 🚋 🚋 ... |
0ad3967 to
8d8a0f8
Compare
|
@OpsBotPrime merge on Friday |
|
Pull request approved for merge by @rudymatela, waiting for rebase behind one pull request. |
... and report version upon starting Hoff.
Approved-by: rudymatela Auto-deploy: false
|
CI job started. |
8d8a0f8 to
4481d93
Compare
|
This is a merge train example. #160 |
Closes: #123
Expose the running version of Hoff in the CLI and Web.
This is useful for avoiding mistakes when deploying: the version number will clearly indicate which version is deployed at a given URL and in the logs.
See the updated CLI and web interfaces below:
$ nix run -c stack exec hoff -- --version Hoff v0.26.2On the web interface, the version is discreetly displayed at the bottom-right of all pages, see:
TODO
Versionmodule exposingversion :: String;--versionswitch;Version.versionandhoff.cabal:version:are the same if possible--versionand--read-onlyswitches (upon--help);src/Version.hs) bumpAddNot now. I will do this in a separate PR.@hoffbot versioncommand?