1 override REPL_OPTIONS += -ignore-dot-ghci
 
   3 cabal := $(wildcard *.cabal)
 
   4 package := $(notdir ./$(cabal:.cabal=))
 
   5 version := $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
 
   6 project := $(patsubst %.cabal,%,$(cabal))
 
  10         cabal build $(CABAL_BUILD_FLAGS)
 
  14         cabal repl $(CABAL_REPL_FLAGS) $(project)
 
  16         ghcid -c 'cabal repl $(CABAL_REPL_FLAGS) $(project) --repl-options "$(REPL_OPTIONS)"' --reverse-errors
 
  19         cabal haddock --haddock-css ocean --haddock-hyperlink-source
 
  22         git tag --merged | grep -Fqx "$(package)-$(version)" || \
 
  23         git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
 
  27         cabal haddock --haddock-for-hackage --enable-doc
 
  30         cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
 
  31         cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
 
  32 %/publish: CABAL_UPLOAD_FLAGS+=--publish
 
  35 publish: upload/publish
 
  40         nix flake update --recreate-lock-file
 
  42         nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)