diff --git a/CHANGELOG.md b/CHANGELOG.md index 749d3e8c1..cd1de8f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed + - #1530, Fix how the PostgREST version is shown in the help text when the `.git` directory is not available - @monacoremo + ## [7.0.1] - 2020-05-18 ### Fixed diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs index 0761f3a65..903be95dd 100644 --- a/src/PostgREST/Config.hs +++ b/src/PostgREST/Config.hs @@ -124,8 +124,12 @@ corsPolicy req = case lookup "origin" headers of -- | User friendly version number prettyVersion :: Text prettyVersion = - intercalate "." (map show $ versionBranch version) - <> " (" <> take 7 $(gitHash) <> ")" + intercalate "." (map show $ versionBranch version) <> gitRev + where + gitRev = + if $(gitHash) == "UNKNOWN" + then mempty + else " (" <> take 7 $(gitHash) <> ")" -- | Version number used in docs docsVersion :: Text