Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa McHale committed Jul 25, 2018
1 parent 17f2641 commit 4074215
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ats-pkg/ats-pkg.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.0
name: ats-pkg
version: 3.1.0.0
version: 3.1.0.1
license: BSD3
license-file: LICENSE
copyright: Copyright: (c) 2018 Vanessa McHale
Expand Down
14 changes: 11 additions & 3 deletions ats-pkg/src/Language/ATS/Package/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,17 @@ mkPkg mStr rba lint tim setup rs tgt v = do
mkConfig :: Maybe String -> Rules ()
mkConfig mStr = do

(".atspkg" </> "args") %> \out ->
alwaysRerun >>
liftIO (BSL.writeFile out (encode mStr))
(".atspkg" </> "args") %> \out -> do
alwaysRerun
shouldWrite <- do
exists <- liftIO (doesFileExist out)
contents <- if exists
then liftIO (BSL.readFile out)
else pure mempty
pure $ BSL.length contents /= 0 && encode mStr /= contents
if shouldWrite
then liftIO (BSL.writeFile out (encode mStr))
else mempty

(".atspkg" </> "config") %> \out -> do
need ["atspkg.dhall", ".atspkg" </> "args"]
Expand Down

0 comments on commit 4074215

Please sign in to comment.