on master help sign in
Add a bunch of exec calls

See: https://twitter.com/denibertovic/status/763676496183582721

commit4f1e50f433089fb8e9afa0b7836a9da066360a85 authorMichael Snoyman <michael@snoyman.com> dateThu 11 Aug 2016, 13:33 (10 years ago) parent42015e5
1 file changed+5−5
automated/build.sh+5−5
automated/build.sh+5−5
@@ -90,7 +90,7 @@ ARGS_UPLOAD="$ARGS_COMMON -u $USER -e HOME=$HOME -e AWS_ACCESS_KEY_ID=$AWS_ACCES
9090# below for why this is safe.)
9191if [ $SHORTNAME = "lts" ]
9292then
93− docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator check-target-available --target $TARGET"
93+ docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec stackage-curator check-target-available --target $TARGET"
9494fi
9595
9696# Get latest stack
@@ -105,20 +105,20 @@ curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip
105105# * Do a single unpack to create the package index cache (again due to directory perms)
106106if [ "${NOPLAN:-}x" = "x" ]
107107then
108− docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "$HOME/bin/stack update && stackage-curator create-plan --plan-file $PLAN_FILE --target $TARGET ${CONSTRAINTS:-} && stackage-curator check --plan-file $PLAN_FILE && stackage-curator fetch --plan-file $PLAN_FILE && cd /tmp && $HOME/bin/stack unpack random"
108+ docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "$HOME/bin/stack update && stackage-curator create-plan --plan-file $PLAN_FILE --target $TARGET ${CONSTRAINTS:-} && stackage-curator check --plan-file $PLAN_FILE && stackage-curator fetch --plan-file $PLAN_FILE && cd /tmp && exec $HOME/bin/stack unpack random"
109109fi
110110
111111# Now do the actual build. We need to first set the owner of the home directory
112112# correctly, so we run the command as root, change owner, and then use sudo to
113113# switch back to the current user
114−docker run $ARGS_BUILD $IMAGE /bin/bash -c "chown $USER $HOME && sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH:$HOME/bin\" stackage-curator make-bundle --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --bundle-file $BUNDLE_FILE --target $TARGET"
114+docker run $ARGS_BUILD $IMAGE /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH:$HOME/bin\" stackage-curator make-bundle --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --bundle-file $BUNDLE_FILE --target $TARGET"
115115
116116# Make sure we actually need this snapshot. We used to perform this check
117117# exclusively before building. Now we perform it after as well for the case of
118118# nightly, where we don't perform this check beforehand. This is also slightly
119119# safer, in case someone else already uploaded a specific snapshot while we
120120# were building.
121−docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator check-target-available --target $TARGET"
121+docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec stackage-curator check-target-available --target $TARGET"
122122
123123# Successful build, so we need to:
124124#
@@ -126,4 +126,4 @@ docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator check-target-avail
126126# * Upload the 00-index.tar file to S3 (TODO: this is probably no longer necessary, since snapshots never modify .cabal files)
127127# * Upload the new plan .yaml file to the appropriate Github repo
128128# * Register as a new Hackage distro
129−docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator upload-docs --target $TARGET --bundle-file $BUNDLE_FILE && stackage-curator upload-index --plan-file $PLAN_FILE --target $TARGET && stackage-curator upload-github --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --target $TARGET && stackage-curator hackage-distro --plan-file $PLAN_FILE --target $TARGET"
129+docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "stackage-curator upload-docs --target $TARGET --bundle-file $BUNDLE_FILE && stackage-curator upload-index --plan-file $PLAN_FILE --target $TARGET && stackage-curator upload-github --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --target $TARGET && exec stackage-curator hackage-distro --plan-file $PLAN_FILE --target $TARGET"