From 5b73dd4fc293d7a1c4e8f40737806c86c246e3a2 Mon Sep 17 00:00:00 2001 From: Dmitrii Kovanikov Date: Tue, 9 Apr 2019 19:23:49 +0800 Subject: [PATCH] Prepare for 1.3.0 release (#308) --- README.md | 57 ++++++++++++++++++- summoner-cli/CHANGELOG.md | 42 +++++++------- summoner-cli/src/Summoner/GhcVer.hs | 2 +- summoner-cli/summoner.cabal | 4 +- summoner-cli/test/Test/Script.hs | 2 +- .../test/golden/fullProject/stack.yaml | 2 +- summoner-tui/CHANGELOG.md | 4 +- summoner-tui/summoner-tui.cabal | 4 +- 8 files changed, 85 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index a86e8cf7..010f873a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ > > Christopher Reeve -Summoner is a tool for scaffolding fully configured batteries-included production Haskell projects. +Summoner is a tool for scaffolding fully configured batteries-included production-level Haskell projects. Do you want to create a library that is to be uploaded to Hackage/Stackage, that builds with both Cabal and Stack and supports the latest three major GHC versions? Or you are building a production application which uses a custom prelude and has CI with Travis Linux and AppVeyors Windows checks? @@ -110,6 +110,7 @@ Below you can see highlighted features in different categories. + Option to include an alternative prelude, if desired. The project would then use [`base-noprelude` technique](http://hackage.haskell.org/package/Prelude), and the `Prelude` module would be added to the library target. + Whole Hackage-upload checklist support. + Support for multiple GHC versions, with thoughtful reflection on project meta, base versions (e.g. `base >= 4.9 && < 4.12`), etc. ++ Ability to create runnable Haskell scripts. + Different license support: MIT, BSD2, BSD3, GPL-2, GPL-3, LGPL-2.1, LGPL-3, AGPL-3, Apache-2.0, MPL-2.0, None (All Rights Reserved license without file). + Creation of the `CHANGELOG.md` file with [PVP versioning policy](https://pvp.haskell.org). + Ability to include your `.stylish-haskell.yaml` file. @@ -150,7 +151,8 @@ Below you can see highlighted features in different categories. ### CI [↑](#structure) -+ Generation of the `.travis.yml` file that runs build and tests on CI under Linux. ++ Generation of the `.travis.yml` file that runs build and tests on CI under Linux using + [Dead simple Haskell Travis Settings for Cabal and Stack](https://chshersh.github.io/posts/2019-02-25-haskell-travis). + Configuration matrix on CI to build with multiple GHC versions and various build tools. + `-Werror` is enabled on CI not to miss any warnings. + Run HLint checks on CI. @@ -324,7 +326,7 @@ Here is the list of the options that can be configured to suit your needs. If op | `ghcVersions` | [GHC] | `summoner` uses default `GHC-8.6.4`. However, additionally you can specify other versions. For each version `x.y.z` the `stack-x.y.z.yaml` will be created. | | `github` | Bool | Turn on `GitHub` integration by default? | | `gitignore` | [Text] | List of files you want added to the default `.gitignore`. (Ignored if `github = false`) | -| `noUpload` | Bool | Do not upload to GitHub, but create all GitHub related files if specified (Ignored if `github = false`) | +| `noUpload` | Bool | Do not upload to GitHub, but create all GitHub related files if specified (Ignored if `github = false`) | | `private` | Bool | Create private repository by default? (Ignored if `github = false`) | | `travis` | Bool | Turn on `Travis` integration by default? (Ignored if `github = false`) | | `appveyor` | Bool | Turn on `AppVeyor` integration by default? (Ignored if `github = false`) | @@ -353,6 +355,7 @@ Usage: Available commands: new Create a new Haskell project + script Create a new Haskell script show Show available licenses or ghc versions Available global options: @@ -406,6 +409,19 @@ Available command options: -b, --benchmark Benchmarks ``` +#### **summon script** command: [↑](#structure) + +``` +Usage: + summon script BUILD_TOOL [-g|--ghc GHC_VERSION] [-n|--name FILE_NAME] + Create a new Haskell script + +Available options: + -h,--help Show this help text + -g,--ghc GHC_VERSION Version of the compiler to be used for script + -n,--name FILE_NAME Name of the script file +``` + #### **summon show** command: [↑](#structure) ``` @@ -464,6 +480,10 @@ To help you navigate between the form fields here are the available hotkeys: Note that the form should be valid in order to be able to go to the Confirm window. If there are some errors in the input, you could see details about these errors in the `Status` section of the form. +#### TUI script command [↑](#structure) + +See [CLI description](#cli-script-command-) of the `summon script` command. + #### TUI show command [↑](#structure) These commands display the list of supported GHC versions or Licenses. Also, when the license name is specified the window with the scrollable content of the License text is shown. @@ -475,6 +495,37 @@ These commands display the list of supported GHC versions or Licenses. Also, whe In CLI mode of operation Summoner asks about every project setting. Most of the questions contain a default value, so you can press Enter to choose the default value. If some option is specified via a configuration file or CLI arguments, then the question is skipped and the predefined value is used. +#### CLI script command [↑](#structure) + +This command creates minimal `cabal` or `stack` script file which allows you to save some keystrokes and eliminates the need to remember magic words for scripts. + +**Cabal example:** `summon script cabal -n Main.hs` generates executable file `Main.hs` with the following content: + +```haskell +#!/usr/bin/env cabal +{- cabal: +build-depends: + , base ^>= 4.12.0.0 +-} + +main :: IO () +main = putStrLn "Hello, World!" +``` + +**Stack example:** `summon script stack -n Main.hs` generates executable file `Main.hs` with the following content: + +```haskell +#!/usr/bin/env stack +{- stack + --resolver lts-13.16 + script + --package base +-} + +main :: IO () +main = putStrLn "Hello, World!" +``` + #### CLI show command [↑](#structure) These commands display the list of supported GHC versions, or Licenses. Also, when the license name is specified, the content of the License is outputted to the terminal. diff --git a/summoner-cli/CHANGELOG.md b/summoner-cli/CHANGELOG.md index 75007341..79f3849a 100644 --- a/summoner-cli/CHANGELOG.md +++ b/summoner-cli/CHANGELOG.md @@ -3,40 +3,40 @@ `summoner` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. -## Unreleased: 1.3.0 +## 1.3.0 — Apr 9, 2019 +* [#285](https://github.com/kowainik/summoner/issues/285): + Implement `summon script` command. * [#151](https://github.com/kowainik/summoner/issues/151), [#295](https://github.com/kowainik/summoner/issues/295): Add support for GHC-8.6. Make GHC-8.6.4 default. -* [#268](https://github.com/kowainik/summoner/issues/268): - Simplify process of adding custom prelude in the interactive mode. -* [#272](https://github.com/kowainik/summoner/issues/272): - Simplify Travis config for Cabal. -* [#275](https://github.com/kowainik/summoner/issues/275): - Simplify Travis settings/installation process for Stack. -* __Important:__ Summoner doesn't add old GHC versions into Travis matrix for - Stack. See this Stack issue for reasoning: - https://github.com/commercialhaskell/stack/issues/4488 -* [#286](https://github.com/kowainik/summoner/issues/286), - [#288](https://github.com/kowainik/summoner/issues/304), - [#304](https://github.com/kowainik/summoner/issues/304): - Bump up to `tomland-1.0.0`, `relude-0.5.0`, `shellmet-0.0.1`, `brick-0.47`. -* [#282](https://github.com/kowainik/summoner/issues/282): - Allow users to extend the .gitignore file. -* [#285](https://github.com/kowainik/summoner/issues/285): - Implement `summon script` command. * [#269](https://github.com/kowainik/summoner/issues/269): __Important:__ Introduce `ghc-options` configuration parameter. Deprecate `warnings` field in TOML file. _Migration guide:_ Please, rename `warnings` field if you use one, it will be removed in the very next release. Use `ghc-options` instead. -* Drop support for GHC-8.6.3 on CI. Support GHC-8.6.4 on CI. +* [#303](https://github.com/kowainik/summoner/issues/303): + Add option `noUpload` to TOML config file. +* __Important:__ Summoner doesn't add old GHC versions into Travis matrix for + Stack anymore. See this Stack issue for reasoning: + https://github.com/commercialhaskell/stack/issues/4488 * [#280](https://github.com/kowainik/summoner/issues/280): Support build with `cabal-install` on the AppVeyor CI. +* [#272](https://github.com/kowainik/summoner/issues/272): + Simplify Travis config for Cabal. +* [#275](https://github.com/kowainik/summoner/issues/275): + Simplify Travis settings/installation process for Stack. * [#261](https://github.com/kowainik/summoner/issues/261): Guess author login, name and email from `.gitconfig`. -* [#303](https://github.com/kowainik/summoner/issues/303): - Add option 'noUpload' to TOML config file. +* [#268](https://github.com/kowainik/summoner/issues/268): + Simplify process of adding custom prelude in the interactive mode. +* [#282](https://github.com/kowainik/summoner/issues/282): + Allow users to extend the `.gitignore` file. +* [#286](https://github.com/kowainik/summoner/issues/286), + [#288](https://github.com/kowainik/summoner/issues/288), + [#304](https://github.com/kowainik/summoner/issues/304): + Bump up to `tomland-1.0.0`, `relude-0.5.0`, `shellmet-0.0.1`. +* Drop support for GHC-8.6.3 on CI. Support GHC-8.6.4 on CI. ## 1.2.0 — Nov 30, 2018 diff --git a/summoner-cli/src/Summoner/GhcVer.hs b/summoner-cli/src/Summoner/GhcVer.hs index 64fd5069..69b4181b 100644 --- a/summoner-cli/src/Summoner/GhcVer.hs +++ b/summoner-cli/src/Summoner/GhcVer.hs @@ -60,7 +60,7 @@ latestLts = \case Ghc843 -> "12.14" Ghc844 -> "12.26" Ghc863 -> "13.11" - Ghc864 -> "13.15" + Ghc864 -> "13.16" -- | Represents PVP versioning (4 numbers). data Pvp = Pvp diff --git a/summoner-cli/summoner.cabal b/summoner-cli/summoner.cabal index 4a6a80b2..05baf1a5 100644 --- a/summoner-cli/summoner.cabal +++ b/summoner-cli/summoner.cabal @@ -1,8 +1,8 @@ cabal-version: 2.0 name: summoner version: 1.3.0 -synopsis: Tool for scaffolding completely configured production Haskell projects. -description: Tool for scaffolding completely configured production Haskell projects. +synopsis: Tool for scaffolding fully configured batteries-included production-level Haskell projects. +description: Tool for scaffolding fully configured batteries-included production-level Haskell projects. See [README.md](https://github.com/kowainik/summoner#-summoner) for details. homepage: https://github.com/kowainik/summoner bug-reports: https://github.com/kowainik/summoner/issues diff --git a/summoner-cli/test/Test/Script.hs b/summoner-cli/test/Test/Script.hs index 08df7984..aa988c8b 100644 --- a/summoner-cli/test/Test/Script.hs +++ b/summoner-cli/test/Test/Script.hs @@ -35,7 +35,7 @@ stackScript :: Text stackScript = [text| #!/usr/bin/env stack {- stack - --resolver lts-13.15 + --resolver lts-13.16 script --package base -} diff --git a/summoner-cli/test/golden/fullProject/stack.yaml b/summoner-cli/test/golden/fullProject/stack.yaml index 42bf13a3..58d40a52 100644 --- a/summoner-cli/test/golden/fullProject/stack.yaml +++ b/summoner-cli/test/golden/fullProject/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-13.15 +resolver: lts-13.16 extra-deps: [base-noprelude-4.12.0.0] diff --git a/summoner-tui/CHANGELOG.md b/summoner-tui/CHANGELOG.md index 9ca5300e..7849b86c 100644 --- a/summoner-tui/CHANGELOG.md +++ b/summoner-tui/CHANGELOG.md @@ -3,7 +3,7 @@ `summoner-tui` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. -## Unreleased: 0.1.0 +## 0.1.0 — Apr 9, 2019 * Upgrade to `summoner-1.3.0`. * [#285](https://github.com/kowainik/summoner/issues/285): @@ -13,6 +13,8 @@ The changelog is available [on GitHub][2]. selected. * [#297](https://github.com/kowainik/summoner/issues/297): Strip project description. +* [#304](https://github.com/kowainik/summoner/issues/304): + Bump up to `brick-0.47`. ## 0.0.0 — Nov 30, 2018 diff --git a/summoner-tui/summoner-tui.cabal b/summoner-tui/summoner-tui.cabal index 15287a6f..09ebb08a 100644 --- a/summoner-tui/summoner-tui.cabal +++ b/summoner-tui/summoner-tui.cabal @@ -1,8 +1,8 @@ cabal-version: 2.0 name: summoner-tui version: 0.1.0 -synopsis: Tool for scaffolding completely configured production Haskell projects using TUI. -description: : Tool for scaffolding completely configured production Haskell projects using TUI. +synopsis: Tool for scaffolding fully configured batteries-included production-level Haskell projects using TUI. +description: Tool for scaffolding fully configured batteries-included production-level Haskell projects using TUI. See [README.md](https://github.com/kowainik/summoner#-summoner) for details. homepage: https://github.com/kowainik/summoner bug-reports: https://github.com/kowainik/summoner/issues