From 7c499bd3f7140397e4737292c4b87ad9e560fef1 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 25 Sep 2023 10:18:00 +0200 Subject: universal-ctags: Add version path segment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … to the download URL. --- app/Main.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/Main.hs') 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 -- cgit v1.2.3