packages feed

ats-pkg 1.1.0.3 → 1.2.0.0

raw patch · 3 files changed

+10/−7 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ats-pkg.cabal view
@@ -1,5 +1,5 @@ name:                ats-pkg-version:             1.1.0.3+version:             1.2.0.0 synopsis:            Package manager for ATS description:         A collection of scripts to make building ATS projects easy. homepage:            https://github.com/vmchale/ats-pkg#readme
src/Language/ATS/Package/Exec.hs view
@@ -7,16 +7,19 @@ import           Control.Composition import           Control.Lens                    hiding (argument) import           Data.Bool                       (bool)+import           Data.Maybe                      (fromMaybe) import           Data.Semigroup                  (Semigroup (..)) import qualified Data.Text.Lazy                  as TL import           Data.Version                    hiding (Version (..))+import           Development.Shake.FilePath import           Dhall                           hiding (bool) import           Language.ATS.Package import           Language.ATS.Package.Dependency import           Language.ATS.Package.Type       hiding (test, version) import           Options.Applicative             hiding (auto) import           Paths_ats_pkg-import           System.Directory                (doesFileExist,+import           System.Directory                (doesFileExist, findFile,+                                                  listDirectory,                                                   withCurrentDirectory) import           System.Environment              (getEnv) import           System.IO.Temp                  (withSystemTempDirectory)@@ -40,7 +43,7 @@ command' = hsubparser     (command "install" (info (pure Install) (progDesc "Install all binaries to $HOME/.local/bin"))     <> command "clean" (info (pure Clean) (progDesc "Clean current project directory"))-    <> command "fetch" (info fetch (progDesc "Fetch and install a binary package"))+    <> command "remote" (info fetch (progDesc "Fetch and install a binary package"))     <> command "build" (info build (progDesc "Build current package targets"))     <> command "test" (info (pure Test) (progDesc "Test current package"))     )@@ -67,7 +70,9 @@ fetchPkg pkg = withSystemTempDirectory "atspkg" $ \p -> do     let (lib, dirName, url') = ("atspkg", p, pkg) & each %~ TL.pack     fetchDeps [Dependency lib dirName url']-    withCurrentDirectory (p ++ "/polyglot-0.3.27") (mkPkg ["install"])+    ps <- fmap ((p ++ "/") ++) <$> listDirectory p+    pkgDir <- fromMaybe p <$> findFile (p:ps) "atspkg.dhall"+    withCurrentDirectory (takeDirectory pkgDir) (mkPkg ["install"])  exec :: IO () exec = execParser wrapper >>= run
src/Language/ATS/Package/Type.hs view
@@ -20,8 +20,7 @@ import           Development.Shake.Man import           Dhall import           Language.ATS.Package.Dependency-import           System.Directory                (getCurrentDirectory,-                                                  listDirectory)+import           System.Directory                (getCurrentDirectory)  options :: ShakeOptions options = shakeOptions { shakeFiles = ".atspkg"@@ -49,7 +48,6 @@ getConfig :: MonadIO m => m Pkg getConfig = liftIO $ do     d <- getCurrentDirectory-    print =<< listDirectory d     input auto (TL.pack d <> "/atspkg.dhall")  manTarget :: Text -> FilePath