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