Find the package category automatically
Some checks failed
Build / audit (push) Successful in 14m21s
Build / test (push) Failing after 5m36s

This commit is contained in:
2024-02-17 14:15:01 +01:00
parent c8643a2fd4
commit 4c06ae274b
3 changed files with 87 additions and 68 deletions

View File

@ -6,7 +6,8 @@ module SlackBuilder.Package
( DownloadPlaceholder(..)
, Download(..)
, DownloadTemplate(..)
, Package(..)
, PackageDescription(..)
, PackageUpdateData(..)
, Maintainer(..)
, Updater(..)
, renderDownloadWithVersion
@ -23,13 +24,18 @@ import Control.Monad.Catch (MonadThrow)
import Data.Map (Map)
-- | Contains information how a package can be updated.
data Package = Package
data PackageDescription = PackageDescription
{ latest :: Updater
, downloaders :: Map Text Updater
, category :: Text
, name :: Text
}
data PackageUpdateData = PackageUpdateData
{ description :: PackageDescription
, category :: Text
, version :: Text
}
-- | Download URI with the MD5 checksum of the target.
data Download = Download
{ download :: URI