packages feed

hapistrano 0.4.2.0 → 0.4.3.0

raw patch · 9 files changed

+46/−13 lines, 9 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,10 @@+## 0.4.3.0+### Added+* Add support for GHC 9.0+* Docker image is built on a newer compiler, cabal and alpine version+### Removed+* Official support for GHC versions older than 8.6+ ## 0.4.2.0 ### Added * Add support for working directory
Dockerfile view
@@ -1,5 +1,5 @@ # Build Hapistrano-FROM alpine:3.9 as build-env+FROM alpine:3.13 as build-env  MAINTAINER Nicolas Vivar <nvivar@stackbuilders.com> @@ -22,10 +22,6 @@ WORKDIR /hapistrano  COPY hapistrano.cabal .--RUN cabal update-RUN cabal install --only-dependencies- COPY src/ src/ COPY app/ app/ COPY script/ script/@@ -33,15 +29,25 @@ COPY Setup.hs . # So Hapistrano is built with version information COPY .git/ .git/+# Cabal has changed behaviour and it requires all modules listed+COPY spec/ spec/+COPY fixtures/ fixtures/+COPY CHANGELOG.md .+COPY README.md .+RUN touch Dockerfile +RUN cabal update+RUN cabal install --only-dependencies RUN cabal configure -f static RUN cabal build hap  # Compress the resulting binary-RUN upx /hapistrano/dist/build/hap/hap+RUN mkdir bin+RUN cp /hapistrano/dist-newstyle/build/x86_64-linux/ghc-8.8.4/hapistrano-0.4.3.0/x/hap/build/hap/hap bin/+RUN upx /hapistrano/bin/hap  # Copy Hapistrano to a basic Alpine with SSH-FROM alpine:3.9+FROM alpine:3.13  RUN apk update \  && apk add \@@ -51,6 +57,6 @@  RUN mkdir ~/.ssh -COPY --from=build-env /hapistrano/dist/build/hap/hap /bin/hap+COPY --from=build-env /hapistrano/bin/hap /bin/hap  ENTRYPOINT ["/bin/hap"]
app/Main.hs view
@@ -1,13 +1,17 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards   #-} {-# LANGUAGE TemplateHaskell   #-}+{-# LANGUAGE CPP               #-}  module Main (main) where  import           Control.Concurrent.Async import           Control.Concurrent.STM import           Control.Monad++#if !MIN_VERSION_base(4,13,0) import           Data.Monoid                ((<>))+#endif import           Data.Version               (showVersion) import qualified Data.Yaml.Config           as Yaml import           Development.GitRev
hapistrano.cabal view
@@ -1,5 +1,5 @@ name:                hapistrano-version:             0.4.2.0+version:             0.4.3.0 synopsis:            A deployment library for Haskell applications description:   .@@ -28,7 +28,7 @@ bug-reports:         https://github.com/stackbuilders/hapistrano/issues build-type:          Simple cabal-version:       >=1.18-tested-with:         GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.3, GHC==8.10.1+tested-with:         GHC==8.6.5, GHC==8.8.4, GHC==8.10.4, GHC==9.0.1 extra-source-files:  CHANGELOG.md                    , README.md                    , Dockerfile
spec/System/HapistranoConfigSpec.hs view
@@ -1,4 +1,6 @@+{-# LANGUAGE CPP             #-} {-# LANGUAGE TemplateHaskell #-}+ module System.HapistranoConfigSpec   ( spec   ) where@@ -8,7 +10,11 @@                                            Source (..), TargetSystem (..))  import qualified Data.Yaml.Config         as Yaml+#if MIN_VERSION_base(4,15,0)+import           Path                     (mkAbsDir)+#else import           Path                     (mkAbsDir, Abs, Dir)+#endif import           Test.Hspec  
spec/System/HapistranoSpec.hs view
@@ -7,12 +7,14 @@  import Control.Monad import Control.Monad.Reader-import Data.Char (isSpace) import Data.List (isPrefixOf) import Data.Maybe (mapMaybe) import Numeric.Natural import Path+#if !MIN_VERSION_base(4,13,0) import Path.Internal (Path(..))+#endif+ import Path.IO import System.Directory (getCurrentDirectory, listDirectory) import qualified System.Hapistrano as Hap
src/System/Hapistrano.hs view
@@ -65,7 +65,7 @@       cloneToRelease taskDeployPath release       setReleaseRevision taskDeployPath release gitRepositoryRevision       return release-    pushReleaseForRepository LocalDirectory {..} =+    pushReleaseForRepository LocalDirectory {} =       newRelease taskReleaseFormat  -- | Same as 'pushRelease' but doesn't perform any version control
src/System/Hapistrano/Commands/Internal.hs view
@@ -13,11 +13,15 @@ {-# LANGUAGE GADTs               #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies        #-}+{-# LANGUAGE CPP                 #-}  module System.Hapistrano.Commands.Internal where  import           Control.Monad.IO.Class import           Data.Char               (isSpace)+#if MIN_VERSION_base(4,15,0)+import           Data.Kind               (Type)+#endif import           Data.List               (dropWhileEnd) import           Data.Maybe              (catMaybes, fromJust, mapMaybe) import           Data.Proxy@@ -31,7 +35,11 @@ -- | Class for data types that represent shell commands in typed way. class Command a where   -- | Type of result.+#if MIN_VERSION_base(4,15,0)+  type Result a :: Type+#else   type Result a :: *+#endif   -- | How to render the command before feeding it into shell (possibly via   -- SSH).   renderCommand :: a -> String
src/System/Hapistrano/Config.hs view
@@ -95,7 +95,7 @@         <*> grabPort m         <*> grabShell m         <*> grabSshArgs m)-    let first Target{..} = host+    let first Target{} = host         configHosts = nubBy ((==) `on` first)           (maybeToList (Target <$> host <*> pure port <*> pure shell <*> pure sshArgs) ++ hs)         source m =