@@ -63,20 +63,19 @@ require_400_file "$HACKAGE_CREDS"
6363mkdir -p $ROOT/bin
6464BINDIR=$(cd $ROOT/bin ; pwd)
6565(
66+CURATOR_EXES=95a207fb4d5bd2e2a255350ce18f55976344eeb71e6f27a25f63e8dba28a4cd1
6667cd $BINDIR
67−rm -f stackage-curator stackage-curator-2*.bz2
68−CURATOR2=stackage-curator-2-f6258124cff9a7e92bcb5704164a70e149080e88
69−wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2"
70−bunzip2 "$CURATOR2.bz2"
71−chmod +x $CURATOR2
72−mv $CURATOR2 stackage-curator
73−./stackage-curator --version
68+rm -f curator stack *.bz2
69+wget "https://s3.amazonaws.com/download.fpcomplete.com/curator-exes/curator-exes-$CURATOR_EXES.tar.bz2"
70+tar xf "curator-exes-$CURATOR_EXES.tar.bz2"
71+echo curator: $(./curator --version)
72+echo stack: $(./stack --version)
7473)
7574
7675# We share pantry directory between snapshots while the other content in .stack
7776# is stored separately (because e.g. Ubuntu releases between LTS and nightly
7877# could differ). Also the order of binds is important.
79−ARGS_COMMON="--rm -v $WORKDIR:$HOME/work -w $HOME/work -v $BINDIR/stackage-curator:/usr/bin/stackage-curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $BINDIR/stack:/usr/bin/stack:ro -v $STACK_DIR:$HOME/.stack -v $PANTRY_DIR:$HOME/.stack/pantry"
78+ARGS_COMMON="--rm -v $WORKDIR:$HOME/work -w $HOME/work -v $BINDIR/curator:/usr/bin/curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $BINDIR/stack:/usr/bin/stack:ro -v $STACK_DIR:$HOME/.stack -v $PANTRY_DIR:$HOME/.stack/pantry"
8079ARGS_PREBUILD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $CABAL_DIR:$HOME/.cabal -v $GHC_DIR:$HOME/.ghc -v $DOT_STACKAGE_DIR:$HOME/.stackage"
8180ARGS_BUILD="$ARGS_COMMON -v $CABAL_DIR:$HOME/.cabal:ro -v $GHC_DIR:$HOME/.ghc:ro"
8281# instance-data is an undocumented feature of S3 used by amazonka,
@@ -89,21 +88,9 @@ ARGS_UPLOAD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $HACKAGE_CREDS:/hackage-cr
8988# below for why this is safe.)
9089if [ $SHORTNAME = "lts" ]
9190then
92− docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec stackage-curator check-target-available --target $TARGET"
91+ docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator check-target-available --target $TARGET"
9392fi
9493
95−# Get latest stack
96−(
97−cd $BINDIR
98−rm -f stack stack-*.bz2
99−STACK=stack-f6258124cff9a7e92bcb5704164a70e149080e88
100−wget "https://download.fpcomplete.com/stackage-curator-2/$STACK.bz2"
101−bunzip2 "$STACK.bz2"
102−chmod +x $STACK
103−mv $STACK stack
104−./stack --version
105−)
106−
10794
10895# Determine the new build plan unless NOPLAN is set
10996#
@@ -113,12 +100,12 @@ if [ "${NOPLAN:-}x" = "x" ]
113100then
114101 if [ $SHORTNAME = "lts" ]
115102 then
116− docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "stackage-curator constraints --target $TARGET && stackage-curator snapshot-incomplete && stackage-curator snapshot"
103+ docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator constraints --target $TARGET && curator snapshot-incomplete --target $TARGET && curator snapshot"
117104 else
118− docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "stackage-curator update && stackage-curator constraints --target $TARGET && stackage-curator snapshot-incomplete && stackage-curator snapshot"
105+ docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator update && curator constraints --target $TARGET && curator snapshot-incomplete --target $TARGET && curator snapshot"
119106 fi
120107else
121− docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "stackage-curator snapshot"
108+ docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator snapshot"
122109fi
123110
124111
@@ -126,7 +113,7 @@ fi
126113#
127114# * Check that the snapshot is valid
128115# * Fetch and unpack all needed tarballs (the build step does not have write access to the tarball directory)
129−docker run $ARGS_PREBUILD $IMAGE /bin/bash -c 'GHCVER=$(sed -n "s/^ghc-version: \(.*\)/\1/p" constraints.yaml) && stack setup ghc-$GHCVER --verbosity=error && stack exec --resolver=ghc-$GHCVER stackage-curator check-snapshot && stackage-curator unpack'
116+docker run $ARGS_PREBUILD $IMAGE /bin/bash -c 'GHCVER=$(sed -n "s/^ghc-version: \(.*\)/\1/p" constraints.yaml) && stack setup ghc-$GHCVER --verbosity=error && stack exec --resolver=ghc-$GHCVER curator check-snapshot && curator unpack'
130117
131118case $SHORTNAME in
132119 lts) JOBS=1 ;;
@@ -136,25 +123,24 @@ esac
136123# Now do the actual build. We need to first set the owner of the home directory
137124# correctly, so we run the command as root, change owner, and then use sudo to
138125# switch back to the current user
139−docker run $ARGS_BUILD $IMAGE nice -n 15 /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH\" stackage-curator build --jobs $JOBS" 2>&1 | tee "$SHORTNAME-build.log"
126+docker run $ARGS_BUILD $IMAGE nice -n 15 /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH\" curator build --jobs $JOBS" 2>&1 | tee "$SHORTNAME-build.log"
140127
141128# Make sure we actually need this snapshot. We used to perform this check
142129# exclusively before building. Now we perform it after as well for the case of
143130# nightly, where we don't perform this check beforehand. This is also slightly
144131# safer, in case someone else already uploaded a specific snapshot while we
145132# were building.
146−docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec stackage-curator check-target-available --target $TARGET"
133+docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator check-target-available --target $TARGET"
147134
148135# Successful build, so we need to:
149136#
150137# * Upload the docs to S3
151138# * Upload the new snapshot .yaml file to the appropriate Github repo, also upload its constraints
152139# * Register as a new Hackage distro (currently disabled)
153−docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator upload-docs --target $TARGET && exec stackage-curator upload-github --target $TARGET"
154−# FIXME - add back "stackage-curator hackage-distro --target $TARGET" when we will be ready to publish
140+docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "curator upload-docs --target $TARGET && curator upload-github --target $TARGET && exec curator hackage-distro --target $TARGET"
155141# information about the new snapshots on Hackage
156142
157−$BINDIR/stackage-curator legacy-bulk --stackage-snapshots dot-stackage/curator/stackage-snapshots/ --lts-haskell dot-stackage/curator/lts-haskell/ --stackage-nightly dot-stackage/curator/stackage-nightly/
143+$BINDIR/curator legacy-bulk --stackage-snapshots dot-stackage/curator/stackage-snapshots/ --lts-haskell dot-stackage/curator/lts-haskell/ --stackage-nightly dot-stackage/curator/stackage-nightly/
158144
159145(
160146