pulumi/scripts/publish.sh
Joe Duffy a74aa51662
Rename pulumi package to @pulumi/pulumi (#917)
In order to begin publishing our core SDK package to NPM, we will
need it to be underneath the @pulumi scope so that it may remain
private.  Eventually, we can alias pulumi back to it.

This is part of pulumi/pulumi#915.
2018-02-12 13:13:13 -08:00

30 lines
761 B
Bash
Executable file

#!/bin/bash
# publish.sh builds and publishes a release.
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
echo "Publishing NPM package to NPMjs.com:"
pushd ${ROOT}/sdk/nodejs/bin && \
npm publish && \
npm info 2>/dev/null || true && \
popd