summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@digitalgrammars.com>2018-07-04 13:40:46 +0200
committerJohn J. Camilleri <john@digitalgrammars.com>2018-07-04 13:40:46 +0200
commitb9b02171601f68a8896ad2f369c700e356c8615b (patch)
treef498583eb56135b9f181de096eba6b4e08d13015
parentf64b17eef7cef49debb9f42e943e02da48089f06 (diff)
Remove code which tries to get version information from darcs folder
-rw-r--r--Setup.hs30
-rw-r--r--gf.cabal5
-rw-r--r--src/compiler/GF/Infra/BuildInfo.hs16
3 files changed, 0 insertions, 51 deletions
diff --git a/Setup.hs b/Setup.hs
index 169047bcb..9749d27fe 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -37,7 +37,6 @@ main = defaultMainWithHooks simpleUserHooks{ preBuild = gfPreBuild
gfPre args distFlag =
do h <- checkRGLArgs args
- extractDarcsVersion distFlag
return h
gfPostBuild args flags pkg lbi =
@@ -383,35 +382,6 @@ default_gf lbi = buildDir lbi </> exeName' </> exeNameReal
exeNameReal = exeName' <.> (if null $ takeExtension exeName' then exeExtension else "")
-}
--- | Create autogen module with detailed version info by querying darcs
-extractDarcsVersion distFlag =
- do info <- tryIOE askDarcs
- createDirectoryIfMissing True autogenPath
- updateFile versionModulePath $ unlines $
- ["module "++modname++" where",
- "{-# NOINLINE darcs_info #-}",
- "darcs_info = "++show (either (const (Left ())) Right info)]
- where
- dist = fromFlagOrDefault "dist" distFlag
- autogenPath = dist</>"build"</>"autogen"
- versionModulePath = autogenPath</>"DarcsVersion_gf.hs"
- modname = "DarcsVersion_gf"
-
-askDarcs =
- do flip unless (fail "no _darcs") =<< doesDirectoryExist "_darcs"
- tags <- lines `fmap` readProcess "darcs" ["show","tags"] ""
- let from = case tags of
- [] -> []
- tag:_ -> ["--from-tag="++tag]
- dates <- (init' . patches) `fmap` readProcess "darcs" ("changes":from) ""
--- let dates = init' (filter ((`notElem` [""," "]).take 1) changes)
- whatsnew <- tryIOE $ lines `fmap` readProcess "darcs" ["whatsnew","-s"] ""
- return (listToMaybe tags,listToMaybe dates,
- length dates,either (const 0) length whatsnew)
- where
- init' [] = []
- init' xs = init xs
-
-- | Only update the file if contents has changed
updateFile path new =
do old <- tryIOE $ readFile path
diff --git a/gf.cabal b/gf.cabal
index 54661ea13..5c795c10a 100644
--- a/gf.cabal
+++ b/gf.cabal
@@ -39,10 +39,6 @@ data-files:
www/translator/*.css
www/translator/*.js
---source-repository head
--- type: darcs
--- location: http://www.grammaticalframework.org/
-
source-repository head
type: git
location: https://github.com/GrammaticalFramework/GF.git
@@ -162,7 +158,6 @@ Library
GF.Data.Operations GF.Infra.Option GF.Infra.UseIO
- DarcsVersion_gf
GF.Command.Abstract
GF.Command.CommandInfo
GF.Command.Commands
diff --git a/src/compiler/GF/Infra/BuildInfo.hs b/src/compiler/GF/Infra/BuildInfo.hs
index 9cf111831..f0230246b 100644
--- a/src/compiler/GF/Infra/BuildInfo.hs
+++ b/src/compiler/GF/Infra/BuildInfo.hs
@@ -2,11 +2,9 @@
module GF.Infra.BuildInfo where
import System.Info
import Data.Version(showVersion)
-import DarcsVersion_gf
{-# NOINLINE buildInfo #-}
buildInfo =
- {-details++"\n"++-}
"Built on "++os++"/"++arch
++" with "++compilerName++"-"++showVersion compilerVersion
++", flags:"
@@ -22,17 +20,3 @@ buildInfo =
#ifdef C_RUNTIME
++" c-runtime"
#endif
- where
- details = either (const no_info) info darcs_info
- no_info = "No detailed version info available"
- info (otag,olast,changes,whatsnew) =
- (case changes of
- 0 -> "No recorded changes"
- 1 -> "One recorded change"
- _ -> show changes++" recorded changes")++
- (case whatsnew of
- 0 -> ""
- 1 -> " + one file with unrecorded changes"
- _ -> " + "++show whatsnew++" files with unrecorded changes")++
- (maybe "" (" since "++) otag)++
- (maybe "" ("\nLast recorded change: "++) olast)