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.
24 lines
653 B
Bash
Executable file
24 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
|