pulumi/scripts/publish.sh
Matt Ellis 9660da4d14 Run Travis on both macOS and Linux
Unlike go binaries (where we can cross compile) the node module that
we publish needs to be built on the platform we publish for. Update
our `.travis.yml` file to also build on macOS and fix the publishing
script so we don't don't cross publish Darwin from Linux. Once we have
CI working for Windows, we'll remove the loop over PUBLISH_GOOS and
each build will publish just the artifacts for the host OS.
2017-10-11 11:40:35 -07:00

24 lines
541 B
Bash
Executable file

#!/bin/bash
# publish.sh builds and publishes a release.
set -o nounset -o errexit -o pipefail
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)
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