yesod version prints yesod-core and yesod version numbers

This commit is contained in:
Michael Snoyman 2012-09-29 20:29:01 +02:00
parent bedabb4038
commit 08e123c0e6
2 changed files with 7 additions and 2 deletions

View File

@ -6,6 +6,8 @@ import System.Exit (exitWith, ExitCode (ExitSuccess))
import System.Process (rawSystem) import System.Process (rawSystem)
import Yesod.Core (yesodVersion) import Yesod.Core (yesodVersion)
import Control.Monad (unless) import Control.Monad (unless)
import qualified Paths_yesod
import Data.Version (showVersion)
#ifndef WINDOWS #ifndef WINDOWS
import Build (touch) import Build (touch)
@ -46,7 +48,9 @@ main = do
rawSystem' cmd ["configure", "--enable-tests", "-flibrary-only"] rawSystem' cmd ["configure", "--enable-tests", "-flibrary-only"]
rawSystem' cmd ["build"] rawSystem' cmd ["build"]
rawSystem' cmd ["test"] rawSystem' cmd ["test"]
["version"] -> putStrLn $ "yesod-core version:" ++ yesodVersion ["version"] -> do
putStrLn $ "yesod-core version:" ++ yesodVersion
putStrLn $ "yesod version:" ++ showVersion Paths_yesod.version
"configure":rest -> rawSystem cmd ("configure":rest) >>= exitWith "configure":rest -> rawSystem cmd ("configure":rest) >>= exitWith
["add-handler"] -> addHandler ["add-handler"] -> addHandler
["keter"] -> keter cmd False ["keter"] -> keter cmd False

View File

@ -1,5 +1,5 @@
name: yesod name: yesod
version: 1.1.1 version: 1.1.1.1
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>
@ -118,6 +118,7 @@ executable yesod
Build Build
Keter Keter
AddHandler AddHandler
Paths_yesod
source-repository head source-repository head
type: git type: git