2021-03-11 13:44:02 +03:00
|
|
|
#!/usr/bin/env bash
|
2022-01-03 19:36:51 +03:00
|
|
|
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2021-03-11 13:44:02 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -eou pipefail
|
|
|
|
|
|
|
|
RELEASE_TAG=$1
|
|
|
|
OUTPUT_DIR=$2
|
|
|
|
|
|
|
|
mkdir -p $OUTPUT_DIR/github
|
2021-03-11 21:16:19 +03:00
|
|
|
mkdir -p $OUTPUT_DIR/artifactory
|
2021-05-25 17:23:17 +03:00
|
|
|
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
|
2021-09-22 19:39:40 +03:00
|
|
|
"/C/Program Files/dotnet/dotnet.exe" tool install --global AzureSignTool --version 3.0.0
|
2021-05-25 17:23:17 +03:00
|
|
|
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" \
|
2021-09-22 19:39:40 +03:00
|
|
|
--azure-key-vault-tenant-id "$AZURE_TENANT_ID" \
|
2021-05-25 17:23:17 +03:00
|
|
|
--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"
|
|
|
|
|
2021-03-11 13:44:02 +03:00
|
|
|
TARBALL=daml-sdk-$RELEASE_TAG-windows.tar.gz
|
2021-03-11 16:49:48 +03:00
|
|
|
EE_TARBALL=daml-sdk-$RELEASE_TAG-windows-ee.tar.gz
|
|
|
|
cp bazel-bin/release/sdk-release-tarball-ce.tar.gz "$OUTPUT_DIR/github/$TARBALL"
|
|
|
|
cp bazel-bin/release/sdk-release-tarball-ee.tar.gz "$OUTPUT_DIR/artifactory/$EE_TARBALL"
|