Skip to content

Commit

Permalink
use git describe for version summary
Browse files Browse the repository at this point in the history
  • Loading branch information
zachjs committed Jul 26, 2020
1 parent 11607f5 commit 2a1e772
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Job.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

module Job where

import GitHash (giHash, tGitInfoCwd)
import GitHash (giDescribe, tGitInfoCwd)
import System.IO (stderr, hPutStr)
import System.Console.CmdArgs
import System.Environment (getArgs, withArgs)
Expand All @@ -31,11 +31,6 @@ data Job = Job
, verbose :: Bool
} deriving (Show, Typeable, Data)

gitHash :: String
gitHash = giHash $$tGitInfoCwd
shortGitHash :: String
shortGitHash = take 7 gitHash

defaultJob :: Job
defaultJob = Job
{ files = def &= args &= typ "FILES"
Expand All @@ -54,7 +49,7 @@ defaultJob = Job
, verbose = nam "verbose" &= help "Retain certain conversion artifacts"
}
&= program "sv2v"
&= summary ("sv2v v0.0.4 (" ++ shortGitHash ++ ")")
&= summary ("sv2v " ++ giDescribe $$tGitInfoCwd)
&= details [ "sv2v converts SystemVerilog to Verilog."
, "More info: https://github.com/zachjs/sv2v"
, "(C) 2019-2020 Zachary Snow, 2011-2015 Tom Hawkins" ]
Expand Down

0 comments on commit 2a1e772

Please sign in to comment.