Skip to content

Commit

Permalink
Switch to using cardano-git-rev from cardano-base repo
Browse files Browse the repository at this point in the history
The version of `cardano-git-rev` in the `cardano-base` repo is a TH
splice instead of a function, so it will always be executed/evaluated
at the call site.
  • Loading branch information
erikd committed Mar 15, 2024
1 parent b10d80d commit c31e441
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 56 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-03-05T09:38:08Z
, cardano-haskell-packages 2024-03-15T13:35:00Z
, hackage.haskell.org 2024-03-14T23:28:52Z
, cardano-haskell-packages 2024-03-14T22:56:07Z

packages:
cardano-cli
Expand Down
3 changes: 1 addition & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ library
Cardano.CLI.EraBased.Run.TextView
Cardano.CLI.EraBased.Run.Transaction
Cardano.CLI.Helpers
Cardano.CLI.IO.GitRev
Cardano.CLI.IO.Lazy
Cardano.CLI.Json.Friendly
Cardano.CLI.Legacy.Commands
Expand Down Expand Up @@ -202,7 +201,7 @@ library
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-wrapper ^>= 1.5.1
, cardano-data >= 1.1
, cardano-git-rev
, cardano-git-rev ^>= 0.2.1
, cardano-ledger-byron >= 1.0.0.2
, cardano-ping ^>= 0.2.0.13
, cardano-prelude
Expand Down
50 changes: 0 additions & 50 deletions cardano-cli/src/Cardano/CLI/IO/GitRev.hs

This file was deleted.

5 changes: 3 additions & 2 deletions cardano-cli/src/Cardano/CLI/Run.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}

-- | Dispatch for running all the CLI commands
module Cardano.CLI.Run
Expand All @@ -14,13 +15,13 @@ import Cardano.CLI.Byron.Run (ByronClientCmdError, renderByronClientCm
runByronClientCommand)
import Cardano.CLI.EraBased.Commands
import Cardano.CLI.EraBased.Run
import Cardano.CLI.IO.GitRev (gitRev)
import Cardano.CLI.Legacy.Commands
import Cardano.CLI.Legacy.Run (runLegacyCmds)
import Cardano.CLI.Render (customRenderHelp)
import Cardano.CLI.Run.Ping (PingClientCmdError (..), PingCmd (..),
renderPingClientCmdError, runPingCmd)
import Cardano.CLI.Types.Errors.CmdError
import Cardano.Git.Rev (gitRev)

import Control.Monad (forM_)
import Control.Monad.IO.Unlift (MonadIO (..))
Expand Down Expand Up @@ -90,7 +91,7 @@ runDisplayVersion = do
[ "cardano-cli ", renderVersion version
, " - ", Text.pack os, "-", Text.pack arch
, " - ", Text.pack compilerName, "-", renderVersion compilerVersion
, "\ngit rev ", gitRev
, "\ngit rev ", $(gitRev)
]
where
renderVersion = Text.pack . showVersion
Expand Down

0 comments on commit c31e441

Please sign in to comment.