2017-07-21 18:37:14 +02:00
|
|
|
#!/bin/bash
|
2018-03-06 23:36:50 +01:00
|
|
|
# publish.sh builds and publishes the tarballs that our other repositories consume.
|
2017-09-22 04:10:33 +02:00
|
|
|
set -o nounset -o errexit -o pipefail
|
2017-07-21 18:37:14 +02:00
|
|
|
|
2018-02-12 22:13:13 +01:00
|
|
|
ROOT=$(dirname $0)/..
|
2017-09-21 23:09:35 +02:00
|
|
|
PUBLISH=$GOPATH/src/github.com/pulumi/home/scripts/publish.sh
|
2017-09-22 04:10:33 +02:00
|
|
|
PUBLISH_GOARCH=("amd64")
|
|
|
|
PUBLISH_PROJECT="pulumi"
|
|
|
|
|
2017-09-07 20:07:52 +02:00
|
|
|
if [ ! -f $PUBLISH ]; then
|
|
|
|
>&2 echo "error: Missing publish script at $PUBLISH"
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-07-21 18:37:14 +02:00
|
|
|
|
2017-09-26 02:00:08 +02:00
|
|
|
OS=$(go env GOOS)
|
|
|
|
|
2018-02-12 22:13:13 +01:00
|
|
|
echo "Publishing SDK build to s3://eng.pulumi.com/:"
|
2017-09-26 02:00:08 +02:00
|
|
|
for ARCH in "${PUBLISH_GOARCH[@]}"
|
2017-09-22 04:10:33 +02:00
|
|
|
do
|
2017-09-26 02:00:08 +02:00
|
|
|
export GOARCH=${ARCH}
|
2017-09-22 04:10:33 +02:00
|
|
|
|
2017-09-26 02:00:08 +02:00
|
|
|
RELEASE_INFO=($($(dirname $0)/make_release.sh))
|
|
|
|
${PUBLISH} ${RELEASE_INFO[0]} "${PUBLISH_PROJECT}/${OS}/${ARCH}" ${RELEASE_INFO[@]:1}
|
2017-09-22 04:10:33 +02:00
|
|
|
done
|