1 override REPL_OPTIONS += -ignore-dot-ghci
2 override GHCID_OPTIONS += --no-height-limit --reverse-errors
4 cabal := $(wildcard *.cabal)
5 package := $(notdir ./$(cabal:.cabal=))
6 version := $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
7 project := $(patsubst %.cabal,%,$(cabal))
11 cabal build $(CABAL_BUILD_FLAGS)
15 cabal repl $(CABAL_REPL_FLAGS) $(project)
17 ghcid $(GHCID_OPTIONS) -c 'cabal repl $(CABAL_REPL_FLAGS) $(project) $(addprefix --repl-options ,$(REPL_OPTIONS))'
20 cabal haddock --haddock-css ocean --haddock-hyperlink-source
23 git tag --merged | grep -Fqx "$(package)-$(version)" || \
24 git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
30 cabal haddock --haddock-for-hackage --enable-doc
33 git push --follow-tags $(GIT_PUSH_FLAGS)
34 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
35 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
36 %/publish: CABAL_UPLOAD_FLAGS+=--publish
39 publish: upload/publish
44 nix flake update --recreate-lock-file
46 nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)