Skip to content

Commit

Permalink
get version from cabal
Browse files Browse the repository at this point in the history
  • Loading branch information
bijoutrouvaille committed Apr 11, 2019
1 parent 1d39b2d commit 5894a9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion fireward.cabal
@@ -1,5 +1,5 @@
name: fireward
version: 0.0.1
version: 0.0.4
-- synopsis:
-- description:
homepage: https://github.com/trouvaille/fireward#readme
Expand All @@ -24,6 +24,7 @@ library
, Error
, LogicPrinter

other-modules: Paths_fireward
build-depends: base >= 4.7 && < 5
default-language: Haskell2010

Expand Down
4 changes: 3 additions & 1 deletion src/OptionParser.hs
Expand Up @@ -24,6 +24,8 @@ import System.IO
, stdin
)
import System.Exit (exitWith, ExitCode(..))
import Paths_fireward (version)
import Data.Version (showVersion)
import Data.List (intercalate)
import Data.Char (isSpace)

Expand Down Expand Up @@ -73,7 +75,7 @@ options =
, Option "V" ["version"]
(NoArg
(\_ -> do
hPutStrLn stderr "Version 0.03"
hPutStrLn stderr ("Version " ++ showVersion version)
exitWith ExitSuccess))
"Print version"

Expand Down

0 comments on commit 5894a9b

Please sign in to comment.