diff --git a/.cirrus.yml b/.cirrus.yml index f15e398..3e88e18 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ task: name: FreeBSD freebsd_instance: - image_family: freebsd-14-2 + image_family: freebsd-14-3 install_script: pkg install -y ghc hs-cabal-install git autoconf bash script: - ./.cirrus/ci.sh build_freebd diff --git a/app/Main.hs b/app/Main.hs index 01fbff8..1c7c793 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE TemplateHaskell #-} + module Main where import Data.Function ((&)) @@ -6,6 +8,7 @@ import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as Text import Data.Version (showVersion) +import Development.GitRev import Effectful import Effectful.Error.Static import Effectful.Error.Static qualified as Error @@ -42,11 +45,15 @@ data Command | Deploy deriving stock (Show, Eq) +programVersion :: String +programVersion = + "confer version " <> showVersion version <> " (commit " <> $(gitHash) <> ")" + main :: IO () main = do hSetBuffering stdout LineBuffering let opts = - info (parseOptions <**> simpleVersioner (showVersion version) <**> helper) $ + info (parseOptions <**> simpleVersioner programVersion <**> helper) $ header "confer – The dotfiles manager" <> progDescDoc (Just programDescription) <> footerDoc (Just programFooter) @@ -157,14 +164,12 @@ osPathOption = maybeReader OsPath.encodeUtf deploymentOsOption :: ReadM DeploymentOS deploymentOsOption = maybeReader $ - \string -> - case string of - "all" -> Just AllOS - os -> Just $ OS (Text.pack os) + \case + "all" -> Just AllOS + os -> Just $ OS (Text.pack os) deploymentArchOption :: ReadM DeploymentArchitecture deploymentArchOption = maybeReader $ - \string -> - case string of - "all" -> Just AllArchs - arch -> Just $ Arch (Text.pack arch) + \case + "all" -> Just AllArchs + arch -> Just $ Arch (Text.pack arch) diff --git a/cabal.project.freeze b/cabal.project.freeze index f131a8b..71b720f 100644 --- a/cabal.project.freeze +++ b/cabal.project.freeze @@ -5,7 +5,7 @@ constraints: any.OneTuple ==0.4.2, any.StateVar ==1.2.2, any.aeson ==2.2.3.0, aeson +ordered-keymap, - any.ansi-terminal ==1.1.3, + any.ansi-terminal ==1.1.4, ansi-terminal -example, any.ansi-terminal-types ==1.1.3, any.array ==0.5.8.0, @@ -40,7 +40,7 @@ constraints: any.OneTuple ==0.4.2, effectful -benchmark-foreign-libraries, any.effectful-core ==2.6.1.0, any.exceptions ==0.10.9, - any.extra ==1.8, + any.extra ==1.8.1, any.file-embed ==0.0.16.0, any.filepath ==1.5.4.0, any.generically ==0.1.1, @@ -65,7 +65,8 @@ constraints: any.OneTuple ==0.4.2, any.integer-conversion ==0.1.1, any.integer-logarithms ==1.0.4, integer-logarithms -check-bounds +integer-gmp, - any.lua ==2.3.3, + any.layoutz ==0.2.0.0, + any.lua ==2.3.4, lua +allow-unsafe-gc -apicheck -cross-compile +export-dynamic -lua_32bits -pkg-config -system-lua, any.monad-control ==1.0.3.1, any.mtl ==2.3.1, @@ -96,8 +97,8 @@ constraints: any.OneTuple ==0.4.2, any.stm ==2.5.3.1, any.strict ==0.5.1, any.strict-mutable-base ==1.1.0.0, - any.tagged ==0.8.9, - tagged +deepseq +transformers, + any.tagged ==0.8.10, + tagged +deepseq +template-haskell, any.tasty ==1.5.3, tasty +unix, any.tasty-coverage ==0.1.4.0, @@ -124,7 +125,7 @@ constraints: any.OneTuple ==0.4.2, any.unix ==2.8.7.0, any.unliftio ==0.2.25.1, any.unliftio-core ==0.2.1.0, - any.unordered-containers ==0.2.20.1, + any.unordered-containers ==0.2.21, unordered-containers -debug, any.uuid-types ==1.0.6, any.validation-selective ==0.2.0.0, @@ -132,4 +133,4 @@ constraints: any.OneTuple ==0.4.2, vector +boundschecks -internalchecks -unsafechecks -wall, any.vector-stream ==0.1.0.1, any.witherable ==0.5 -index-state: hackage.haskell.org 2025-10-13T15:52:55Z +index-state: hackage.haskell.org 2025-12-25T16:49:32Z diff --git a/confer.cabal b/confer.cabal index a34ba71..3a54f23 100644 --- a/confer.cabal +++ b/confer.cabal @@ -133,6 +133,7 @@ executable confer effectful, effectful-core, filepath, + gitrev, optparse-applicative, text,