Skip to content

Commit

Permalink
chore(docs): update README.md, fix haddock warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vst committed Mar 3, 2022
1 parent 5644a6a commit 7a6832c
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 3 deletions.
114 changes: 112 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,118 @@
> reach the first minor version. Until then, we will keep bumping the patch
> version.
*haspara* is a Haskell library providing data definitions and functions to work
with monetary values.
*haspara* is a Haskell library that provides monetary definitions and a
rudimentary (and experimental) accounting functionality.

## Development

Before committing code to repository, reformat the code:

```sh
stylish-haskell -i -r src/
```

Compile the codebase, check warnings and errors:

```sh
stack test
stack build
stack haddock
```

Run [hlint](https://github.com/ndmitchell/hlint):

```sh
hlint src/
```

Run [weeder](https://hackage.haskell.org/package/weeder):

```sh
weeder --require-hs-files
```

## Making Releases

1. Switch to `develop` branch:

```sh
git checkout develop
```

1. Ensure that your development branch is up to date:

```sh
git pull
```

1. Checkout `main` branch:

```sh
git checkout main
```

1. Merge `develop` branch to `main`:

```sh
git merge --no-ff develop
```

1. Update the `version` information in [package.yaml](./package.yaml) if
required and recompile the project to reflect the change on the `.cabal`
file:

```sh
stack build
```

1. Update [CHANGELOG.md](./CHANGELOG.md) file:

```sh
git-chglog --next-tag <NEW-VERSION> -o CHANGELOG.md
```

1. Commit, tag and push:

```sh
git commit -am "chore(release): <NEW-VERSION>"
git tag -a -m "Release <NEW-VERSION>" <NEW-VERSION>
git push --follow-tags origin main
```

1. Release to Hackage as a candidate first and check the result:

```sh
stack upload --pvp-bounds both --candidate .
```

1. If the candidate package release works fine, release to Hackage:

```sh
stack upload --pvp-bounds both .
```

1. Checkout to `develop` and rebase onto `main`:

```sh
git checkout develop
git rebase main
```

1. Update the `version` information in [package.yaml](./package.yaml) with the
upcoming version and recompile the project to reflect the change on the
`.cabal` file:

```sh
stack build
```

1. Commit and push:

```sh
git commit -am "chore: bump development version to <UPCOMING-VERSION>"
git push
```

## License

Expand Down
5 changes: 5 additions & 0 deletions src/Haspara.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- | This module provides high-level definitions of @haspara@ library.
--
-- @haspara@ provides rudimentary (and experimental) accounting functionality,
-- too. These definitions can be found under "Haspara.Accounting" module.

module Haspara
( module Haspara.Currency
, module Haspara.FxQuote
Expand Down
2 changes: 1 addition & 1 deletion src/Haspara/TH.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- | This module provides template-haskell functions for various 'Haspara.Core.Base'
-- | This module provides template-haskell functions for various "Haspara"
-- definitions.

module Haspara.TH where
Expand Down

0 comments on commit 7a6832c

Please sign in to comment.