diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-09-27 19:58:16 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-09-27 19:58:16 +0200 |
| commit | 69b24c6cfa524d5367df1b9b5a7b5c8bcd8da259 (patch) | |
| tree | 4541d257bc93258d9c3ae995731bc49badde6e6a /app/SlackBuilder/Download.hs | |
| parent | 7c499bd3f7140397e4737292c4b87ad9e560fef1 (diff) | |
| download | slackbuilder-69b24c6cfa524d5367df1b9b5a7b5c8bcd8da259.tar.gz | |
universal-ctags: Finish migrating the updater
Diffstat (limited to 'app/SlackBuilder/Download.hs')
| -rw-r--r-- | app/SlackBuilder/Download.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/SlackBuilder/Download.hs b/app/SlackBuilder/Download.hs index 5d4cb8d..d5bd7e8 100644 --- a/app/SlackBuilder/Download.hs +++ b/app/SlackBuilder/Download.hs @@ -77,8 +77,14 @@ commit :: Text -> Text -> SlackBuilderT () commit packagePath version = do branch' <- SlackBuilderT $ Text.unpack <$> asks branch repository' <- SlackBuilderT $ asks repository + signature' <- SlackBuilderT $ asks $ signature . maintainer let message = Text.unpack $ packagePath <> ": Updated for version " <> version + mainCommitArguments = ["-C", repository', "commit", "-m", message] + commitArguments = + if signature' + then mainCommitArguments <> ["-S"] + else mainCommitArguments (checkoutExitCode, _, _) <- liftIO $ withFile "/dev/null" WriteMode @@ -89,7 +95,7 @@ commit packagePath version = do $ callProcess "git" ["-C", repository', "checkout", "-b", branch', "master"] liftIO $ callProcess "git" ["-C", repository', "add", Text.unpack packagePath] - >> callProcess "git" ["-C", repository', "commit", "-S", "-m", message] + >> callProcess "git" commitArguments where testCheckout repository' branch' nullHandle = let createCheckoutProcess = (proc "git" ["-C", repository', "checkout", branch']) |
