Skip to content

Instantly share code, notes, and snippets.

@strake
Created June 10, 2022 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strake/d2058eb9b19b6c282fe415b1676603f6 to your computer and use it in GitHub Desktop.
Save strake/d2058eb9b19b6c282fe415b1676603f6 to your computer and use it in GitHub Desktop.
Script to ease uploading packages to a Hackage instance
#!/bin/sh
set -e
src_pkg_path="$(cabal sdist | sed -n '$p')"
doc_pkg_path="$(cabal haddock --haddock-for-hackage | sed -n '$p')"
set +e
cabal upload "$@" "$src_pkg_path"
cabal upload -d "$@" "$doc_pkg_path"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment