diff options
Diffstat (limited to 'Version.hs')
-rw-r--r-- | Version.hs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Version.hs b/Version.hs index 5f414e93b..d4a58d77a 100644 --- a/Version.hs +++ b/Version.hs @@ -15,13 +15,18 @@ import qualified Annex import qualified GitRepo as Git import Locations -currentVersion :: String -currentVersion = "2" +type Version = String + +defaultVersion :: Version +defaultVersion = "2" + +supportedVersions :: [Version] +supportedVersions = [defaultVersion] versionField :: String versionField = "annex.version" -getVersion :: Annex String +getVersion :: Annex Version getVersion = do g <- Annex.gitRepo let v = Git.configGet g versionField "" @@ -42,7 +47,7 @@ getVersion = do (True, True) -> return "1" _ -> do setVersion - return currentVersion + return defaultVersion setVersion :: Annex () -setVersion = Annex.setConfig versionField currentVersion +setVersion = Annex.setConfig versionField defaultVersion |