Skip to content
Snippets Groups Projects
Commit 535806a0 authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

ci: Logging

parent e31d8e1e
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,10 @@ set -e
cipher=aes-256-cbc
if [ -z "$PATCHES" ]; then PATCHES=./patches; fi
log() {
echo "$1"
}
# For use by administrator.
gen_keys_tarball() {
hackage-repo-tool create-keys --keys=./keys
......@@ -157,27 +161,34 @@ build_constraints() {
# Build the hackage repository
build_repo() {
log "Building Hackage repository in $(pwd)/repo..."
# hackage-repo-tool bootstrap fails unless there is at least one package in the
# repo. Seed things with acme-box.
log "Fetching acme-box..."
cabal update
cabal fetch acme-box-0.0.0.0
mkdir -p repo/package
cp $HOME/.cabal/packages/hackage.haskell.org/acme-box/0.0.0.0/acme-box-0.0.0.0.tar.gz repo/package
mkdir -p tmp
cp -R $PATCHES tmp/patches
log "Bootstrapping repository..."
hackage-repo-tool bootstrap --keys=./keys --repo=./repo
mkdir -p template tmp/patches.cache
log "Patching packages..."
mkdir -p tmp template tmp/patches.cache
cp -R $PATCHES tmp/patches
tool \
--patches=./tmp/patches \
--repo-cache=./cache \
--keys=./keys \
--repo-name=head.hackage \
--repo-url=http://hackage.haskell.org/ \
--template=template \
./repo
log "Building constraints..."
build_constraints > repo/cabal.constraints
log "Building index..."
build_index
rm -R tmp
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment