diff --git a/app/Main.hs b/app/Main.hs index e0d64b4..b49bacf 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -8,12 +8,14 @@ import Effectful import Effectful.Error.Static import Options.Applicative import System.Exit - import Data.Text (Text) import Data.Text.Display (display) import Data.Vector (Vector) + import Extract import Types +import Data.Version (showVersion) +import Paths_get_tested (version) data Options = Options { path :: FilePath @@ -28,7 +30,7 @@ data Options = Options main :: IO () main = do - result <- execParser (parseOptions `withInfo` "Extract the tested-with stanza from your cabal file") + result <- execParser (parseOptions `withInfo` "Generate a test matrix from the tested-with stanza of your cabal file") processingResult <- runEff . runErrorNoCallStack $ runOptions result case processingResult of Right json -> ByteString.putStrLn json @@ -49,6 +51,7 @@ parseOptions = <*> optional (strOption (long "ubuntu-version" <> metavar "VERSION" <> help "Enable the Ubuntu runner with the selected version")) <*> switch (long "windows" <> help "(legacy) Enable the Windows runner's latest version") <*> optional (strOption (long "windows-version" <> metavar "VERSION" <> help "Enable the Windows runner with the selected version")) + <**> simpleVersioner (showVersion version) runOptions :: Options -> Eff [Error ProcessingError, IOE] ByteString runOptions options = do diff --git a/get-tested b/get-tested new file mode 100755 index 0000000..018d585 Binary files /dev/null and b/get-tested differ diff --git a/get-tested.cabal b/get-tested.cabal index bd0381d..00f763d 100644 --- a/get-tested.cabal +++ b/get-tested.cabal @@ -1,6 +1,6 @@ cabal-version: 3.4 name: get-tested -version: 0.1.6.0 +version: 0.1.7.0 synopsis: Get the tested-with stanza of your Cabal file -- description: @@ -9,7 +9,7 @@ license: BSD-3-Clause license-file: LICENSE author: Hécate Moonlight maintainer: hecate+github@glitchbra.in -tested-with: GHC ==9.6.2 +tested-with: GHC ==9.6.4 -- copyright: category: Development @@ -49,6 +49,7 @@ executable get-tested other-modules: Extract Types + Paths_get_tested build-depends: , aeson ^>=2.1