summaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 46256cc..5b888b4 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -39,7 +39,8 @@ autoUpdatable =
let ghArguments = GhArguments{ owner = "universal-ctags", name = "ctags", transform = Nothing}
latest' = latestGitHub ghArguments pure
templateTail =
- [ Package.StaticPlaceholder "/ctags-"
+ [ Package.VersionPlaceholder
+ , Package.StaticPlaceholder "/ctags-"
, Package.VersionPlaceholder
, Package.StaticPlaceholder ".tar.gz"
]
@@ -56,8 +57,10 @@ autoUpdatable =
up2Date :: SlackBuilderT ()
up2Date = for_ autoUpdatable go
where
- go package@Package{ latest = Package.Updater getLatest _ } =
- getLatest >>= mapM_ (updatePackage package)
+ go package = getAndLogLatest package >>= mapM_ (updatePackage package)
+ getAndLogLatest Package{ latest = Package.Updater getLatest _, name }
+ = liftIO (putStrLn $ Text.unpack name <> ": Retreiving the latest version.")
+ >> getLatest
updatePackage :: Package -> Text -> SlackBuilderT ()
updatePackage Package{..} version = do