mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 08:48:21 +03:00
42cf70b18e
I'm not quite sure what's going wrong here, but this PR: - Fixes a small bug in the process for determininng that we're _not_ in a split release, which worked because the boolean expression crashing is the same as the boolean expression returning false. But I'd still prefer if it returned false without crashing. - Changes the condition for skipping the Windows installer so that in case of ternary+ logic we default to the harmless behaviour (including it). - Makes a change that might have some impact maybe on the way Azure expands templates which may or may not result in the installer being excluded when it should be excluded. But this time if it doesn't work worst case we get an extra unused binary that uses some disk space, instead of crashing the release. CHANGELOG_BEGIN CHANGELOG_END
48 lines
1.9 KiB
Bash
Executable File
48 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
set -eou pipefail
|
|
|
|
RELEASE_TAG=$1
|
|
OUTPUT_DIR=$2
|
|
SPLIT_RELEASE=${3:-false}
|
|
|
|
mkdir -p $OUTPUT_DIR/github
|
|
mkdir -p $OUTPUT_DIR/artifactory
|
|
mkdir -p $OUTPUT_DIR/split-release
|
|
|
|
if ! [ "$SPLIT_RELEASE" = "true" ]; then
|
|
INSTALLER="$OUTPUT_DIR/github/daml-sdk-$RELEASE_TAG-windows.exe"
|
|
EE_INSTALLER="$OUTPUT_DIR/artifactory/daml-sdk-$RELEASE_TAG-windows-ee.exe"
|
|
mv "bazel-bin/release/windows-installer/daml-sdk-installer-ce.exe" "$INSTALLER"
|
|
mv "bazel-bin/release/windows-installer/daml-sdk-installer-ee.exe" "$EE_INSTALLER"
|
|
chmod +wx "$INSTALLER"
|
|
chmod +wx "$EE_INSTALLER"
|
|
|
|
if ! [ -f /C/Users/u/.dotnet/tools/azuresigntool.exe ]; then
|
|
"/C/Program Files/dotnet/dotnet.exe" tool install --global AzureSignTool --version 3.0.0
|
|
fi
|
|
|
|
/C/Users/u/.dotnet/tools/azuresigntool.exe sign \
|
|
--azure-key-vault-url "$AZURE_KEY_VAULT_URL" \
|
|
--azure-key-vault-client-id "$AZURE_CLIENT_ID" \
|
|
--azure-key-vault-tenant-id "$AZURE_TENANT_ID" \
|
|
--azure-key-vault-client-secret "$AZURE_CLIENT_SECRET" \
|
|
--azure-key-vault-certificate "$AZURE_KEY_VAULT_CERTIFICATE" \
|
|
--description "Daml SDK installer" \
|
|
--description-url "https://daml.com" \
|
|
--timestamp-rfc3161 "http://timestamp.digicert.com" \
|
|
--file-digest sha384 \
|
|
--verbose \
|
|
"$INSTALLER" \
|
|
"$EE_INSTALLER"
|
|
fi
|
|
|
|
TARBALL=daml-sdk-$RELEASE_TAG-windows.tar.gz
|
|
EE_TARBALL=daml-sdk-$RELEASE_TAG-windows-ee.tar.gz
|
|
cp bazel-bin/release/sdk-release-tarball-ce.tar.gz "$OUTPUT_DIR/github/$TARBALL"
|
|
# Used for the non-split release process.
|
|
cp bazel-bin/release/sdk-release-tarball-ee.tar.gz "$OUTPUT_DIR/artifactory/$EE_TARBALL"
|
|
# Used for the split release process.
|
|
cp bazel-bin/release/sdk-release-tarball-ee.tar.gz "$OUTPUT_DIR/split-release/$EE_TARBALL"
|