releaser 0.3.0.2 → 0.3.0.3
raw patch · API changes only · 3 files changed · show whitespace changes · browse releaser-0.3.0.3
+21/−3 lines, 3 filesPVP ok
API changes (from Hackage documentation)
No changes to the public API.
version bump matches the API change (PVP)
Files
- CHANGELOG.md +4/−0
- releaser.cabal +1/−1
- src/Releaser/Primitives.hs +16/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for releaser +## 0.3.0.3 -- 2026-12-04++* Cabal 3.14 support (GHC 9.12)+ ## 0.3.0.2 -- 2023-11-01 * New primitive `assertCommandExists`
releaser.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: releaser synopsis: Automation of Haskell package release process-version: 0.3.0.2+version: 0.3.0.3 license: Apache-2.0 license-file: LICENSE maintainer: info@hercules-ci.com
src/Releaser/Primitives.hs view
@@ -46,6 +46,9 @@ import Distribution.Types.PackageId (pkgName, pkgVersion) import Distribution.Types.PackageName (unPackageName) import Distribution.Types.Version (mkVersion', versionNumbers)+#if MIN_VERSION_Cabal(3,14,0)+import Distribution.Utils.Path (interpretSymbolicPath, makeSymbolicPath)+#endif import Distribution.Verbosity (Verbosity, normal, silent) import System.Console.Pretty (Color (..), color) import System.Directory (findExecutable)@@ -90,11 +93,22 @@ (_warnings, Left (v, e)) -> fail $ "Cabal file " ++ p ++ " has problems:\n" ++ unlines (map (showPError p) (toList e)) #endif +-- | Find the Cabal file in a folder, as a path that includes the folder+findCabalFile :: FilePath -> IO FilePath+#if MIN_VERSION_Cabal(3,14,0)+findCabalFile dir =+ interpretSymbolicPath pkgDir <$> tryFindPackageDesc silent pkgDir+ where+ pkgDir = Just (makeSymbolicPath dir)+#else+findCabalFile = tryFindPackageDesc silent+#endif+ -- | Given a folder, find a Cabal file and read the package version cabalRead :: FilePath -> IO CabalInfo cabalRead dir = do logStep $ "Looking for a cabal file in " <> dir- cabalFile <- tryFindPackageDesc silent dir+ cabalFile <- findCabalFile dir genericPackageDescription <- readGenericPackageDescription silent cabalFile let pkgversion = pkgVersion $ package $ packageDescription genericPackageDescription pkgname = pkgName $ package $ packageDescription genericPackageDescription@@ -111,7 +125,7 @@ cabalWriteVersion dir versionStr = do if validCabalVersion versionStr then do- cabalFile <- tryFindPackageDesc silent dir+ cabalFile <- findCabalFile dir cabalinfo <- cabalRead dir cabal <- T.readFile cabalFile let versionPrev :: T.Text