* Make `async:true` the default for `invoke` calls (#3750) * Switch away from native grpc impl. (#3728) * Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752) * Only retry as long as we get unavailable back. Anything else continues. (#3769) * Handle all errors for now. (#3781) * Do not assume --yes was present when using pulumi in non-interactive mode (#3793) * Upgrade all paths for sdk and pkg to v2 * Backport C# invoke classes and other recent gen changes (#4288) Adjust C# generation * Replace IDeployment with a sealed class (#4318) Replace IDeployment with a sealed class * .NET: default to args subtype rather than Args.Empty (#4320) * Adding system namespace for Dotnet code gen This is required for using Obsolute attributes for deprecations ``` Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj] Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj] ``` * Fix the nullability of config type properties in C# codegen (#4379)
71 lines
2.5 KiB
Bash
Executable file
71 lines
2.5 KiB
Bash
Executable file
#!/bin/bash
|
|
# make_release.sh will create a build package ready for publishing.
|
|
set -o nounset
|
|
set -o errexit
|
|
set -o pipefail
|
|
|
|
readonly ROOT=$(dirname "${0}")/..
|
|
readonly PUBDIR=$(mktemp -d)
|
|
readonly GITHASH=$(git rev-parse HEAD)
|
|
readonly PUBFILE=$(dirname "${PUBDIR})/${GITHASH}.tgz")
|
|
readonly VERSION=$("${ROOT}/scripts/get-version" HEAD)
|
|
|
|
# Figure out which branch we're on. Prefer $TRAVIS_BRANCH, if set, since
|
|
# Travis leaves us at detached HEAD and `git rev-parse` just returns "HEAD".
|
|
readonly BRANCH=${TRAVIS_BRANCH:-$(git rev-parse --abbrev-ref HEAD)}
|
|
declare -a PUBTARGETS=(${GITHASH} ${VERSION} ${BRANCH})
|
|
|
|
# usage: run_go_build <path-to-package-to-build>
|
|
run_go_build() {
|
|
local bin_suffix=""
|
|
local -r output_name=$(basename $(cd "${1}" ; pwd))
|
|
if [ "$(go env GOOS)" = "windows" ]; then
|
|
bin_suffix=".exe"
|
|
fi
|
|
|
|
mkdir -p "${PUBDIR}/bin"
|
|
pushd "$2" > /dev/null && go build \
|
|
-ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=${VERSION}" \
|
|
-o "${PUBDIR}/bin/${output_name}${bin_suffix}" \
|
|
"$1"
|
|
popd > /dev/null
|
|
}
|
|
|
|
# usage: copy_package <path-to-module> <module-name>
|
|
copy_package() {
|
|
local -r module_root="${PUBDIR}/node_modules/${2}"
|
|
|
|
mkdir -p "${module_root}"
|
|
cp -r "${1}" "${module_root}/"
|
|
if [[ -e "${module_root}/node_modules" ]]; then
|
|
rm -rf "${module_root}/node_modules"
|
|
fi
|
|
if [[ -e "${module_root}/tests" ]]; then
|
|
rm -rf "${module_root}/tests"
|
|
fi
|
|
}
|
|
|
|
readonly PULUMI_ROOT=$PWD
|
|
|
|
# Build binaries
|
|
run_go_build "${PULUMI_ROOT}/pkg/cmd/pulumi" "pkg"
|
|
run_go_build "${PULUMI_ROOT}/sdk/nodejs/cmd/pulumi-language-nodejs" "sdk"
|
|
run_go_build "${PULUMI_ROOT}/sdk/python/cmd/pulumi-language-python" "sdk"
|
|
run_go_build "${PULUMI_ROOT}/sdk/dotnet/cmd/pulumi-language-dotnet" "sdk"
|
|
run_go_build "${PULUMI_ROOT}/sdk/go/pulumi-language-go" "sdk"
|
|
|
|
# Copy over the language and dynamic resource providers.
|
|
cp "${ROOT}/sdk/nodejs/dist/pulumi-resource-pulumi-nodejs" "${PUBDIR}/bin/"
|
|
cp "${ROOT}/sdk/python/dist/pulumi-resource-pulumi-python" "${PUBDIR}/bin/"
|
|
cp "${ROOT}/sdk/nodejs/dist/pulumi-analyzer-policy" "${PUBDIR}/bin/"
|
|
cp "${ROOT}/sdk/python/dist/pulumi-analyzer-policy-python" "${PUBDIR}/bin/"
|
|
cp "${ROOT}/sdk/python/cmd/pulumi-language-python-exec" "${PUBDIR}/bin/"
|
|
|
|
# Copy packages
|
|
copy_package "${ROOT}/sdk/nodejs/bin/." "@pulumi/pulumi"
|
|
|
|
# Tar up the file and then print it out for use by the caller or script.
|
|
tar -czf "${PUBFILE}" -C ${PUBDIR} .
|
|
echo ${PUBFILE} ${PUBTARGETS[@]}
|
|
|
|
exit 0
|