2011-03-19 18:33:24 +00:00
|
|
|
{- git-annex command
|
|
|
|
-
|
|
|
|
- Copyright 2010 Joey Hess <joey@kitenet.net>
|
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Command.Version where
|
|
|
|
|
|
|
|
import Control.Monad.State (liftIO)
|
|
|
|
import Data.String.Utils
|
|
|
|
|
|
|
|
import Command
|
|
|
|
import qualified SysConfig
|
|
|
|
import Version
|
|
|
|
|
|
|
|
command :: [Command]
|
2011-03-19 22:58:49 +00:00
|
|
|
command = [standaloneCommand "version" paramNothing seek "show version info"]
|
2011-03-19 18:33:24 +00:00
|
|
|
|
|
|
|
seek :: [CommandSeek]
|
|
|
|
seek = [withNothing start]
|
|
|
|
|
|
|
|
start :: CommandStartNothing
|
|
|
|
start = do
|
|
|
|
liftIO $ putStrLn $ "git-annex version: " ++ SysConfig.packageversion
|
|
|
|
v <- getVersion
|
|
|
|
liftIO $ putStrLn $ "local repository version: " ++ v
|
|
|
|
liftIO $ putStrLn $ "default repository version: " ++ defaultVersion
|
|
|
|
liftIO $ putStrLn $ "supported repository versions: " ++ vs supportedVersions
|
|
|
|
liftIO $ putStrLn $ "upgrade supported from repository versions: " ++ vs upgradableVersions
|
2011-05-15 06:02:46 +00:00
|
|
|
stop
|
2011-03-19 18:33:24 +00:00
|
|
|
where
|
|
|
|
vs l = join " " l
|