Fix UNKNOWN being shown as git commit hash (#1533)
Fixes https://github.com/PostgREST/postgrest/issues/1530
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user