pulumi/scripts/publish_tgz.sh
Matt Ellis 936abeb118 Publish tgz's in the middle of the build, packages at the end
While it's safe to publish the tgz that we use internally for other
repositories that are on "the link plan" after the build completes, we
shouldn't publish packages to NPM and PyPi at that point. There are
two reasons for doing this:

1. Publishing packages before they are tested, which means we could
end up publishing packages that don't work.

2. NPM prevents publishing the same package more than once, so if we
had to re-run the job (due to tests failing for transient issues), the
publish step will start failing, preventing us from running the tests
at all.
2018-03-06 19:20:47 -08:00

25 lines
653 B
Bash
Executable file

#!/bin/bash
# publish.sh builds and publishes the tarballs that our other repositories consume.
set -o nounset -o errexit -o pipefail
ROOT=$(dirname $0)/..
PUBLISH=$GOPATH/src/github.com/pulumi/home/scripts/publish.sh
PUBLISH_GOARCH=("amd64")
PUBLISH_PROJECT="pulumi"
if [ ! -f $PUBLISH ]; then
>&2 echo "error: Missing publish script at $PUBLISH"
exit 1
fi
OS=$(go env GOOS)
echo "Publishing SDK build to s3://eng.pulumi.com/:"
for ARCH in "${PUBLISH_GOARCH[@]}"
do
export GOARCH=${ARCH}
RELEASE_INFO=($($(dirname $0)/make_release.sh))
${PUBLISH} ${RELEASE_INFO[0]} "${PUBLISH_PROJECT}/${OS}/${ARCH}" ${RELEASE_INFO[@]:1}
done