2017-09-07 20:07:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# make_release.sh will create a build package ready for publishing.
|
|
|
|
set -e
|
|
|
|
|
2017-09-08 06:52:58 +02:00
|
|
|
ROOT=$(dirname $0)/..
|
2017-09-07 20:07:52 +02:00
|
|
|
PUBDIR=$(mktemp -du)
|
|
|
|
GITVER=$(git rev-parse HEAD)
|
|
|
|
PUBFILE=$(dirname ${PUBDIR})/${GITVER}.tgz
|
|
|
|
PUBPREFIX=s3://eng.pulumi.com/releases/pulumi-fabric
|
|
|
|
declare -a PUBTARGETS=(${GITVER} $(git describe --tags) $(git rev-parse --abbrev-ref HEAD))
|
|
|
|
|
2017-09-11 05:23:11 +02:00
|
|
|
# Copy the binaries, scripts, and packs.
|
2017-09-07 20:07:52 +02:00
|
|
|
mkdir -p ${PUBDIR}/bin/
|
|
|
|
cp ${GOPATH}/bin/lumi ${PUBDIR}/bin/
|
2017-09-08 06:52:58 +02:00
|
|
|
mkdir -p ${PUBDIR}/sdk/
|
2017-09-11 05:23:11 +02:00
|
|
|
cp -R ${GOPATH}/src/github.com/pulumi/pulumi/scripts/. ${PUBDIR}/scripts/
|
2017-09-07 23:33:00 +02:00
|
|
|
cp -R ${ROOT}/sdk/nodejs/bin/. ${PUBDIR}/sdk/nodejs/
|
2017-09-07 20:07:52 +02:00
|
|
|
cp -R ${ROOT}/sdk/nodejs/node_modules/. ${PUBDIR}/sdk/nodejs/node_modules/
|
|
|
|
echo sdk/nodejs/ >> ${PUBDIR}/packs.txt
|
|
|
|
|
|
|
|
# Tar up the file and then print it out for use by the caller or script.
|
|
|
|
tar -czf ${PUBFILE} -C ${PUBDIR} .
|
|
|
|
echo ${PUBFILE} ${PUBTARGETS[@]}
|
|
|
|
|