2021-03-11 13:44:02 +03:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
STAGING_DIR=$1
|
|
|
|
|
RELEASE_TAG=$2
|
|
|
|
|
|
|
|
|
|
# We’ve already published to GH so focus on artifactory
|
|
|
|
|
|
2021-03-11 16:49:48 +03:00
|
|
|
|
INPUTS=$STAGING_DIR/release-artifacts/artifactory
|
2021-03-11 13:44:02 +03:00
|
|
|
|
|
|
|
|
|
push() {
|
|
|
|
|
local file repository local_path md5 sha1
|
|
|
|
|
repository=$1
|
|
|
|
|
file=$2
|
2021-03-12 03:29:55 +03:00
|
|
|
|
local_path=$INPUTS/${file}
|
2021-03-11 13:44:02 +03:00
|
|
|
|
md5=$(md5sum ${local_path} | awk '{print $1}')
|
|
|
|
|
sha1=$(sha1sum ${local_path} | awk '{print $1}')
|
|
|
|
|
curl -f \
|
|
|
|
|
-u "$AUTH" \
|
|
|
|
|
-H "X-Checksum-MD5:${md5}" \
|
|
|
|
|
-H "X-Checksum-SHA1:${sha1}" \
|
|
|
|
|
-X PUT \
|
|
|
|
|
-T ${local_path} \
|
2021-03-12 13:39:50 +03:00
|
|
|
|
https://digitalasset.jfrog.io/artifactory/${repository}/$RELEASE_TAG/${file}
|
2021-03-11 13:44:02 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TRIGGER_RUNNER=daml-trigger-runner-$RELEASE_TAG.jar
|
|
|
|
|
SCRIPT_RUNNER=daml-script-$RELEASE_TAG.jar
|
2021-03-25 13:48:49 +03:00
|
|
|
|
NON_REPUDIATION=non-repudiation-$RELEASE_TAG.jar
|
2021-03-11 13:44:02 +03:00
|
|
|
|
|
|
|
|
|
push daml-trigger-runner $TRIGGER_RUNNER
|
|
|
|
|
push daml-trigger-runner $TRIGGER_RUNNER.asc
|
|
|
|
|
push daml-script-runner $SCRIPT_RUNNER
|
|
|
|
|
push daml-script-runner $SCRIPT_RUNNER.asc
|
2021-03-25 13:48:49 +03:00
|
|
|
|
push non-repudiation $NON_REPUDIATION
|
|
|
|
|
push non-repudiation $NON_REPUDIATION.asc
|
2021-03-11 16:49:48 +03:00
|
|
|
|
|
|
|
|
|
for platform in linux macos windows; do
|
|
|
|
|
EE_TARBALL=daml-sdk-$RELEASE_TAG-$platform-ee.tar.gz
|
|
|
|
|
push sdk-ee $EE_TARBALL
|
|
|
|
|
push sdk-ee $EE_TARBALL.asc
|
|
|
|
|
done
|
|
|
|
|
EE_INSTALLER=daml-sdk-$RELEASE_TAG-windows-ee.exe
|
|
|
|
|
push sdk-ee $EE_INSTALLER
|
|
|
|
|
push sdk-ee $EE_INSTALLER.asc
|