mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
29 lines
1015 B
Bash
Executable File
29 lines
1015 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
|
|
|
ETC=$(cd $(dirname $0) ; pwd)
|
|
export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "$ETC/../build-constraints.yaml")
|
|
|
|
# Download and unpack the stack executable
|
|
mkdir -p ~/.local/bin
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
|
|
|
# Get new Stackage curator
|
|
curl -L "https://github.com/commercialhaskell/curator/releases/download/commit-6689440033b12182c0853bdd23880a84849eb6b2/curator.bz2" | bunzip2 > curator
|
|
chmod +x curator
|
|
|
|
# Install GHC
|
|
stack setup $GHCVER
|
|
|
|
# curator's constraint command has target as a required parameter
|
|
# because of a different constraints handling in minor LTS version bumps
|
|
NIGHTLY="nightly-$(date +%Y-%m-%d)"
|
|
# New curator check
|
|
./curator update &&
|
|
./curator constraints --target=$NIGHTLY &&
|
|
./curator snapshot-incomplete --target=$NIGHTLY &&
|
|
./curator snapshot &&
|
|
stack --resolver ghc-$GHCVER exec ./curator check-snapshot
|