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
|
|
|
|
|
2011-10-05 20:02:51 +00:00
|
|
|
import Common.Annex
|
2011-03-19 18:33:24 +00:00
|
|
|
import Command
|
2011-08-20 20:11:42 +00:00
|
|
|
import qualified Build.SysConfig as SysConfig
|
2011-10-04 04:40:47 +00:00
|
|
|
import Annex.Version
|
2011-03-19 18:33:24 +00:00
|
|
|
|
|
|
|
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]
|
|
|
|
|
2011-09-15 20:50:49 +00:00
|
|
|
start :: CommandStart
|
2011-03-19 18:33:24 +00:00
|
|
|
start = do
|
|
|
|
liftIO $ putStrLn $ "git-annex version: " ++ SysConfig.packageversion
|
|
|
|
v <- getVersion
|
2011-06-22 22:07:45 +00:00
|
|
|
liftIO $ putStrLn $ "local repository version: " ++ fromMaybe "unknown" v
|
2011-03-19 18:33:24 +00:00
|
|
|
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
|
2011-07-15 16:47:14 +00:00
|
|
|
vs = join " "
|