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
|
### 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
|
## [7.0.1] - 2020-05-18
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -124,8 +124,12 @@ corsPolicy req = case lookup "origin" headers of
|
|||||||
-- | User friendly version number
|
-- | User friendly version number
|
||||||
prettyVersion :: Text
|
prettyVersion :: Text
|
||||||
prettyVersion =
|
prettyVersion =
|
||||||
intercalate "." (map show $ versionBranch version)
|
intercalate "." (map show $ versionBranch version) <> gitRev
|
||||||
<> " (" <> take 7 $(gitHash) <> ")"
|
where
|
||||||
|
gitRev =
|
||||||
|
if $(gitHash) == "UNKNOWN"
|
||||||
|
then mempty
|
||||||
|
else " (" <> take 7 $(gitHash) <> ")"
|
||||||
|
|
||||||
-- | Version number used in docs
|
-- | Version number used in docs
|
||||||
docsVersion :: Text
|
docsVersion :: Text
|
||||||
|
|||||||
Reference in New Issue
Block a user