Skip to content
Snippets Groups Projects

ci: Simplify usage directions

Merged Ben Gamari requested to merge wip/simplify-usage into master
+ 17
13
@@ -63,10 +63,12 @@ repository $REPO_NAME
EOF
}
build_index() {
build_index_page() {
local commit="$CI_COMMIT_SHA"
local commit_url="https://gitlab.haskell.org/ghc/head.hackage/commit/$commit"
build_repository_blurb >repo/cabal.project.local
build_repository_blurb >repo/repo.cabal.project
cat repo/repo.cabal.project > repo/cabal.project
build_constraints >> repo/cabal.project
cat >repo/ci.html <<EOF
<!DOCTYPE html>
@@ -123,16 +125,18 @@ EOF
<p>The source of this package repository is at <a href="https://gitlab.haskell.org/ghc/head.hackage">gitlab.haskell.org/ghc/head.hackage</a>.
<p>To use package repository with <code>cabal-install</code> add the following
to your project's <code>cabal.project.local</code> and run
<code>cabal v2-update</code>: (consider using <code>scripts/head.hackage.sh update</code> as <code>v2-update</code> is broken, <a href="https://github.com/haskell/cabal/issues/5952">Cabal bug #5952</a>)
<p>To use package repository with <code>cabal-install >= 3.6</code> simply run the following:
<pre><code>
$(cat repo/cabal.project.local)
$ curl https://ghc.gitlab.haskell.org/head.hackage/cabal.project >> cabal.project.local
$ cabal update
</code></pre>
<p>Finally, you may want to add the <a
href="cabal.constraints">constraints</a> to your project to ensure that
cabal chooses the patched releases.
<p>This will add the following <code>source-repository</code> stanza to your project's <code>cabal.project.local</code>:
<pre><code>
$(cat repo/repo.cabal.project)
</code></pre>
as well as the version constraints in <a
href="cabal.constraints"><code>cabal.constraints</code></a>.
<p>If you find a package that doesn't build with a recent GHC
pre-release see the <a
@@ -188,8 +192,8 @@ build_repo() {
log "Building constraints..."
build_constraints > repo/cabal.constraints
log "Building index..."
build_index
log "Building index page..."
build_index_page
rm -R tmp
}
@@ -201,7 +205,7 @@ case $1 in
build-repository-blurb) build_repository_blurb ;;
build-index)
build_constraints > repo/cabal.constraints
build_index ;;
build_index_page ;;
*)
echo "error: Unknown command $1."
echo
Loading