on nightly help sign in
stackage/etc/check.sh
28 lines 1.0 kB history raw
1#!/usr/bin/env bash
3set -euxo pipefail
5ETC=$(cd $(dirname $0) ; pwd)
6export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "$ETC/../build-constraints.yaml")
8# Download and unpack the stack executable
9mkdir -p ~/.local/bin
10export PATH=$HOME/.local/bin:$PATH
11curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
13# Get new Stackage curator
14curl -L "https://github.com/commercialhaskell/curator/releases/download/commit-a79aadca0f6497ec6accc927df5be7c49f5de86a/curator.bz2" | bunzip2 > curator
15chmod +x curator
17# Install GHC
18stack setup $GHCVER
20# curator's constraint command has target as a required parameter
21# because of a different constraints handling in minor LTS version bumps
22NIGHTLY="nightly-$(date +%Y-%m-%d)"
23# New curator check
24./curator update &&
25 ./curator constraints --target=$NIGHTLY &&
26 ./curator snapshot-incomplete --target=$NIGHTLY &&
27 ./curator snapshot &&
28 stack --resolver ghc-$GHCVER exec ./curator check-snapshot