diff --git a/README.md b/README.md index 97762672..066f3559 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,11 @@ See https://github.com/restyled-io/actions#readme. ## Development -```console -just -``` - Requires [stack](https://docs.haskellstack.org/en/stable/README/). -## Tests - ```console -just test +stack setup +stack build --fast --pedantic --test --file-watch ``` ## LICENSE diff --git a/justfile b/justfile index aee0c986..9abd3ac9 100644 --- a/justfile +++ b/justfile @@ -1,44 +1,11 @@ -# Setup, lint, build and test -all: setup build test lint - -# Install dependencies -setup: - stack setup - stack build --dependencies-only --test --no-run-tests - stack install --copy-compiler-tool \ - apply-refact \ - fast-tags \ - fourmolu \ - hlint \ - weeder - -# Build but do not run tests -build: - stack build --fast --pedantic --test --no-run-tests - -# Build and test -test: - stack build --fast --pedantic --test - -# Lint and format the project -lint: - stack exec -- fourmolu -i app src test - stack exec -- hlint app src test - stack exec -- weeder --require-hs-files - stack lint-extra-deps - -# Rebuild and test on file-changes -watch: - stack build --fast --pedantic --test --file-watch - -headroom: - stack exec -- headroom run - stack exec -- fourmolu -i app src test - install-root := `stack path --local-install-root` dist := 'restyler-' + `uname -s | tr '[:upper:]' '[:lower:]'` + '-' + `uname -m` ext := 'tar.gz' +headroom: + headroom run + fourmolu -i app src test + dist: mkdir -p '{{dist}}' cp -v '{{install-root}}'/bin/* '{{dist}}'