Browse Source

Use a special publish image (#10)

Re-enable the normal flow

More small updates to generating docs

Fix the haddock script

PROVISIONAL: publish from PR

Use a special publish image

Co-authored-by: Alex Feldman-Crough <alex@fldcr.com>
Reviewed-on: #10
master
alex 1 year ago
parent
commit
be63f7eb2e
  1. 6
      .drone.yml
  2. 2
      scripts/documentation-coverage
  3. 9
      scripts/release

6
.drone.yml

@ -49,7 +49,7 @@ steps:
- ./scripts/documentation-coverage
- name: release
image: utdemir/ghc-musl:v4-integer-simple-ghc881
image: registry.in.fldcr.com/cabal-publish:latest
depends_on:
- ghc 8.8.1
- ghc 8.6.5
@ -65,7 +65,7 @@ steps:
commands:
- ./scripts/release
when:
event:
event:
- tag
volumes:
@ -74,6 +74,6 @@ volumes:
path: /var/cache/cabal
---
kind: signature
hmac: bac8c74fe1e90b09b1882056f198fc4294c7cc72d3a875f0e0aa29b67b2e0e77
hmac: 4182c9a06e0671846733a1cd1617ad52119e1a96be312770004503c6be80b553
...

2
scripts/documentation-coverage

@ -4,7 +4,7 @@ set -e
tmpfile="$(mktemp)"
trap "rm -f $tmpfile" EXIT
cabal v2-haddock --enable-documentation 2>&1 | tee "$tmpfile"
cabal v2-haddock --haddock-for-hackage --enable-documentation 2>&1 | tee "$tmpfile"
if grep --quiet --fixed-strings 'Missing documentation for:' "$tmpfile"
then
printf -- '-----\nERROR: Not all public exports have documentation.' >&2

9
scripts/release

@ -5,6 +5,11 @@ cd "$(git rev-parse --show-toplevel)"
version="$(grep '^version:' prosidy.cabal | sed 's|^version: *||')"
echo "Publishing v${version}" >&2
do-upload ()
{
cabal upload --username="${HACKAGE_USER}" --password="${HACKAGE_PASSWORD}" "$@"
}
cabal sdist
cabal upload --username="${HACKAGE_USER}" --password="${HACKAGE_PASSWORD}" "dist-newstyle/sdist/prosidy-${version}.tar.gz"
cabal upload --username="${HACKAGE_USER}" --password="${HACKAGE_PASSWORD}" --documentation
do-upload "dist-newstyle/sdist/prosidy-${version}.tar.gz"
do-upload --documentation "dist-newstyle/prosidy-${version}-docs.tar.gz"
Loading…
Cancel
Save