Skip to content

Commit

Permalink
Merge pull request #90 from objectionary/release-v0.1.0
Browse files Browse the repository at this point in the history
Release v0.1.0
  • Loading branch information
fizruk authored Feb 2, 2024
2 parents f48af77 + 05d01ab commit 523d5b6
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 20 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:

pipeline:
name: "Run pipeline"
# TODO run on more runners on master
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
release:
types: [published]

permissions:
contents: write

jobs:
hackage:
name: "Upload a new candidate on Hackage"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: 🧰 Setup Stack
uses: freckle/stack-action@v4
with:
fast: false

- name: 🔨 Generate package dist tarball
run: stack sdist --tar-dir packages/

- name: 🚀 Upload on Hackage
uses: haskell-actions/hackage-publish@v1
with:
hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }}
packagesPath: packages
publish: false
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Normalizer for 𝜑-calculus

[![`rzk` on Hackage](https://img.shields.io/hackage/v/eo-phi-normalizer)](http://hackage.haskell.org/package/eo-phi-normalizer)
[![Haddock](<https://shields.io/badge/Haddock%20(master)-Code%20documentation-informational>)](https://www.objectionary.com/normalizer/haddock/)

Command line normalizer of 𝜑-calculus expressions (as produced by the [EO compiler](https://github.com/objectionary/eo)).

## About
Expand Down Expand Up @@ -220,20 +223,21 @@ chmod +x scripts/run-fourmolu.sh
1. Install [Python 3](https://www.python.org/downloads/) (e.g., Python 3.10).
1. [Install pre-commit](https://pre-commit.com/#1-install-pre-commit).
- Alternatively, run `pip3 install`.
- Alternatively, run `pip3 install`.
1. [Install the git hook scripts](https://pre-commit.com/#3-install-the-git-hook-scripts).
1. Install [fourmolu](https://github.com/fourmolu/fourmolu).
```console
stack install fourmolu
```
```console
stack install fourmolu
```
- You can remove `fourmolu` later (see [SO post](https://stackoverflow.com/a/38639959))
- You can remove `fourmolu` later (see [SO post](https://stackoverflow.com/a/38639959))
1. Make a script executable.
```console
chmod +x scripts/run-fourmolu.sh
```
```console
chmod +x scripts/run-fourmolu.sh
```
#### pre-commit configs
Expand All @@ -250,24 +254,26 @@ pre-commit run -c .pre-commit-config.yaml fourmolu-format --all
#### pre-commit workflow
- `pre-commit` runs before a commit (at the [pre-commit phase](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_committing_workflow_hooks))
> The pre-commit hook is run first, before you even type in a commit message. It's used to inspect the snapshot that's about to be committed, to see if you've forgotten something, to make sure tests run, or to examine whatever you need to inspect in the code. Exiting non-zero from this hook aborts the commit ...
- `pre-commit` stashes ([link](https://git-scm.com/docs/git-stash)) unstaged ([link](https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F#_the_three_states)) files.
```console
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/eyjafjallajokull/.cache/pre-commit/patch1705090051-437857.
```
```console
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/eyjafjallajokull/.cache/pre-commit/patch1705090051-437857.
```
- `pre-commit` runs hooks.
- A hook may exit with an error, e.g.:
```md
Format Haskell (.hs) files...............................................Failed
- hook id: fourmolu
- exit code: 102
- files were modified by this hook
```
```md
Format Haskell (.hs) files...............................................Failed
- hook id: fourmolu
- exit code: 102
- files were modified by this hook
```
- In case of the [fourmolu](https://github.com/fourmolu/fourmolu) formatter,
it's assumed that formatting a formatted `Haskell` file doesn't modify it.
Expand All @@ -277,6 +283,7 @@ pre-commit run -c .pre-commit-config.yaml fourmolu-format --all
- `pre-commit` unstashes files.
- You should stage all changes so that `pre-commit` does not complain.
- In case of `fourmolu`, stage the formatted code regions.
- Now, you can commit.
4 changes: 3 additions & 1 deletion eo-phi-normalizer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ and this project adheres to the

## Unreleased

## 0.1.0.0 - YYYY-MM-DD
## 0.1.0 - 2024-02-02

First version of the normalizer.
7 changes: 7 additions & 0 deletions eo-phi-normalizer/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# eo-phi-normalizer

[![`rzk` on Hackage](https://img.shields.io/hackage/v/eo-phi-normalizer)](http://hackage.haskell.org/package/eo-phi-normalizer)
[![Haddock](<https://shields.io/badge/Haddock%20(master)-Code%20documentation-informational>)](https://www.objectionary.com/normalizer/haddock/)

Command line normalizer of 𝜑-calculus expressions (as produced by the [EO compiler](https://github.com/objectionary/eo)).

See <https://github.com/objectionary/normalizer#readme>.

1 comment on commit 523d5b6

@0pdd
Copy link

@0pdd 0pdd commented on 523d5b6 Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 82-b088af7b disappeared from eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs), that's why I closed #86. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

Please sign in to comment.