diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-10-20 15:53:48 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-10-20 15:53:48 +0200 |
| commit | 3a6d17952b247682f1cb794ef27b26c9b007f00d (patch) | |
| tree | dfbfd7fe8ad4bba5084b6d5de7c9f97b010d5c51 /app/Main.hs | |
| parent | 4105ffa91f85d66e631383211b5d074b04fc0d3c (diff) | |
| download | slackbuilder-3a6d17952b247682f1cb794ef27b26c9b007f00d.tar.gz | |
Allow looking on the text page for the latest version
Diffstat (limited to 'app/Main.hs')
| -rw-r--r-- | app/Main.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/Main.hs b/app/Main.hs index 99be344..27ae118 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -2,6 +2,8 @@ module Main ( main ) where +import Data.Char (isNumber) +import Control.Applicative (Applicative(liftA2)) import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NonEmpty import Control.Monad.IO.Class (MonadIO(..)) @@ -147,6 +149,25 @@ autoUpdatable = , name = "rdiff-backup" , reupload = Just mempty } + , Package + { latest = + let needle = "Linux—" + textArguments = TextArguments + { textURL = "https://help.webex.com/en-us/article/mqkve8/Webex-App-%7C-Release-notes" + , versionPicker = Text.takeWhile (liftA2 (||) (== '.') isNumber) + . Text.drop (Text.length needle) + . snd + . Text.breakOn needle + } + latest' = latestText textArguments + template = Package.DownloadTemplate $ pure + $ Package.StaticPlaceholder + "https://binaries.webex.com/WebexDesktop-Ubuntu-Official-Package/Webex.deb" + in Package.Updater latest' template + , category = "network" + , name = "webex" + , reupload = Nothing + } ] up2Date :: SlackBuilderT () |
