Commit 2a1e772a by Zachary Snow

use git describe for version summary

parent 11607f55
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
module Job where module Job where
import GitHash (giHash, tGitInfoCwd) import GitHash (giDescribe, tGitInfoCwd)
import System.IO (stderr, hPutStr) import System.IO (stderr, hPutStr)
import System.Console.CmdArgs import System.Console.CmdArgs
import System.Environment (getArgs, withArgs) import System.Environment (getArgs, withArgs)
...@@ -31,11 +31,6 @@ data Job = Job ...@@ -31,11 +31,6 @@ data Job = Job
, verbose :: Bool , verbose :: Bool
} deriving (Show, Typeable, Data) } deriving (Show, Typeable, Data)
gitHash :: String
gitHash = giHash $$tGitInfoCwd
shortGitHash :: String
shortGitHash = take 7 gitHash
defaultJob :: Job defaultJob :: Job
defaultJob = Job defaultJob = Job
{ files = def &= args &= typ "FILES" { files = def &= args &= typ "FILES"
...@@ -54,7 +49,7 @@ defaultJob = Job ...@@ -54,7 +49,7 @@ defaultJob = Job
, verbose = nam "verbose" &= help "Retain certain conversion artifacts" , verbose = nam "verbose" &= help "Retain certain conversion artifacts"
} }
&= program "sv2v" &= program "sv2v"
&= summary ("sv2v v0.0.4 (" ++ shortGitHash ++ ")") &= summary ("sv2v " ++ giDescribe $$tGitInfoCwd)
&= details [ "sv2v converts SystemVerilog to Verilog." &= details [ "sv2v converts SystemVerilog to Verilog."
, "More info: https://github.com/zachjs/sv2v" , "More info: https://github.com/zachjs/sv2v"
, "(C) 2019-2020 Zachary Snow, 2011-2015 Tom Hawkins" ] , "(C) 2019-2020 Zachary Snow, 2011-2015 Tom Hawkins" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment