Add version filter to the configuration
This commit is contained in:
@ -33,6 +33,7 @@ data PackageSettings = PackageSettings
|
||||
{ name :: Text
|
||||
, template :: Text
|
||||
, is64 :: Bool
|
||||
, version :: Text
|
||||
, github :: Maybe (Text, Text)
|
||||
, packagist :: Maybe (Text, Text)
|
||||
, text :: Maybe (Text, [String])
|
||||
@ -58,6 +59,7 @@ packageSettingsCodec = PackageSettings
|
||||
<$> Toml.text "name" .= name
|
||||
<*> Toml.text "template" .= template
|
||||
<*> Toml.bool "is64" .= is64
|
||||
<*> Toml.text "version" .= version
|
||||
<*> Toml.dioptional (Toml.table githubCodec "github") .= github
|
||||
<*> Toml.dioptional (Toml.table packagistCodec "packagist") .= packagist
|
||||
<*> Toml.dioptional (Toml.table textCodec "text") .= text
|
||||
|
@ -190,7 +190,7 @@ latestPackagist PackageOwner{..} = do
|
||||
fullName = Text.intercalate "/" [owner, name]
|
||||
|
||||
pure $ HashMap.lookup fullName packagistPackages
|
||||
>>= fmap (version . fst) . Vector.uncons
|
||||
>>= fmap (getField @"version" . fst) . Vector.uncons
|
||||
|
||||
-- * Remote text file
|
||||
|
||||
|
Reference in New Issue
Block a user