From c80dce468b0660387e71e66743920b284c04f720 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 May 2016 01:34:17 -0400 Subject: Updated cabal file explictly lists source files. The tarball on hackage will include only the files needed for cabal install; it is NOT the full git-repair source tree. debian/changelog: Converted to symlinks to CHANGELOG. --- Build/Version.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Build/Version.hs') diff --git a/Build/Version.hs b/Build/Version.hs index da9d1bb..d39a0fe 100644 --- a/Build/Version.hs +++ b/Build/Version.hs @@ -1,24 +1,26 @@ {- Package version determination, for configure script. -} +{-# OPTIONS_GHC -fno-warn-tabs #-} + module Build.Version where -import Data.Maybe -import Control.Applicative import Data.List import System.Environment -import System.Directory import Data.Char import System.Process +import Control.Applicative +import Prelude import Utility.Monad import Utility.Exception +import Utility.Directory type Version = String {- Set when making an official release. (Distribution vendors should set - this too.) -} isReleaseBuild :: IO Bool -isReleaseBuild = isJust <$> catchMaybeIO (getEnv "RELEASE_BUILD") +isReleaseBuild = (== Just "1") <$> catchMaybeIO (getEnv "RELEASE_BUILD") {- Version is usually based on the major version from the changelog, - plus the date of the last commit, plus the git rev of that commit. @@ -44,7 +46,7 @@ getVersion = do getChangelogVersion :: IO Version getChangelogVersion = do - changelog <- readFile "debian/changelog" + changelog <- readFile "CHANGELOG" let verline = takeWhile (/= '\n') changelog return $ middle (words verline !! 1) where -- cgit v1.2.3