Skip to content

Commit

Permalink
Remove the updateLibsassVersion from Setup.hs
Browse files Browse the repository at this point in the history
It should not be required now - libsass generates the version on the fly
using `git` and passes it as environment variable.
  • Loading branch information
jakubfijalkowski committed Feb 21, 2020
1 parent 46d799d commit dbd1969
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ main = defaultMainWithHooks hooksFix
, preBuild = updateLibDirs
, postCopy = copyLibsass
, postClean = cleanLibsass
, preSDist = updateLibsassVersion
}
-- Fix for Cabal-1.18 - it does not `copy` on `install`, so we `copy` on
-- `install` manually. ;)
Expand Down Expand Up @@ -140,14 +139,6 @@ cleanLibsass :: Args -> CleanFlags -> PackageDescription -> () -> IO ()
cleanLibsass _ flags _ _ =
execMake (fromFlag $ cleanVerbosity flags) "" "clean"

updateLibsassVersion :: Args -> SDistFlags -> IO HookedBuildInfo
updateLibsassVersion _ flags = do
let verbosity = fromFlag $ sDistVerbosity flags
ver <- rawSystemStdout verbosity "env" [ "git", "-C", "libsass", "describe",
"--abbrev=4", "--dirty", "--always", "--tags" ]
writeFile "libsass/VERSION" ver
return emptyHookedBuildInfo

#if MIN_VERSION_Cabal(2, 2, 0)
getCabalFlag :: String -> ConfigFlags -> Bool
getCabalFlag name flags = fromMaybe False (lookupFlagAssignment (mkFlagName name') allFlags)
Expand Down

0 comments on commit dbd1969

Please sign in to comment.