diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/SlackBuilder/Package.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/SlackBuilder/Package.hs b/lib/SlackBuilder/Package.hs index 6907d47..8310858 100644 --- a/lib/SlackBuilder/Package.hs +++ b/lib/SlackBuilder/Package.hs @@ -17,7 +17,6 @@ import qualified Text.URI as URI import Crypto.Hash (Digest, MD5) import SlackBuilder.Trans import Control.Monad.Catch (MonadThrow) -import System.Process (CmdSpec(..)) -- | Contains information how a package can be updated. data Package = Package @@ -25,7 +24,6 @@ data Package = Package , downloaders :: [Updater] , category :: Text , name :: Text - , reupload :: Maybe [CmdSpec] } -- | Download URI with the MD5 checksum of the target. @@ -79,4 +77,7 @@ renderDownloadWithVersion (DownloadTemplate components) version = f VersionPlaceholder = (version <>) -- | Function used to get the latest version of a source. -data Updater = Updater (SlackBuilderT (Maybe Text)) DownloadTemplate +data Updater = Updater + { detectLatest :: SlackBuilderT (Maybe Text) + , getVersion :: Text -> Text -> SlackBuilderT (URI, Digest MD5) + } |
