2021-03-11 13:44:02 +03:00
|
|
|
|
#!/usr/bin/env bash
|
2023-01-04 20:21:15 +03:00
|
|
|
|
# Copyright (c) 2023 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 -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() {
|
2022-01-17 20:33:44 +03:00
|
|
|
|
local file repository md5 sha1
|
2021-03-11 13:44:02 +03:00
|
|
|
|
repository=$1
|
|
|
|
|
file=$2
|
2022-01-17 20:33:44 +03:00
|
|
|
|
md5=$(md5sum ${file} | awk '{print $1}')
|
|
|
|
|
sha1=$(sha1sum ${file} | awk '{print $1}')
|
2021-03-11 13:44:02 +03:00
|
|
|
|
curl -f \
|
|
|
|
|
-u "$AUTH" \
|
|
|
|
|
-H "X-Checksum-MD5:${md5}" \
|
|
|
|
|
-H "X-Checksum-SHA1:${sha1}" \
|
|
|
|
|
-X PUT \
|
2022-01-17 20:33:44 +03:00
|
|
|
|
-T ${file} \
|
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
|
2021-04-09 14:24:18 +03:00
|
|
|
|
TRIGGER_SERVICE=trigger-service-$RELEASE_TAG-ee.jar
|
2021-03-11 13:44:02 +03:00
|
|
|
|
SCRIPT_RUNNER=daml-script-$RELEASE_TAG.jar
|
2021-04-09 14:24:18 +03:00
|
|
|
|
NON_REPUDIATION=non-repudiation-$RELEASE_TAG-ee.jar
|
2021-04-13 17:12:18 +03:00
|
|
|
|
HTTP_JSON=http-json-$RELEASE_TAG-ee.jar
|
2021-03-11 13:44:02 +03:00
|
|
|
|
|
2022-01-17 20:33:44 +03:00
|
|
|
|
cd $INPUTS
|
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-04-09 14:24:18 +03:00
|
|
|
|
push trigger-service $TRIGGER_SERVICE
|
|
|
|
|
push trigger-service $TRIGGER_SERVICE.asc
|
2021-04-13 17:12:18 +03:00
|
|
|
|
push http-json $HTTP_JSON
|
|
|
|
|
push http-json $HTTP_JSON.asc
|
2021-03-11 16:49:48 +03:00
|
|
|
|
|
2021-04-06 15:32:28 +03:00
|
|
|
|
for base in non-repudiation-core non-repudiation-client; do
|
|
|
|
|
for end in .jar .pom -sources.jar -javadoc.jar; do
|
|
|
|
|
for sign in "" .asc; do
|
|
|
|
|
push connect-ee-mvn/com/daml/$base $base-${RELEASE_TAG}${end}${sign}
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
done
|
2021-03-30 13:18:07 +03:00
|
|
|
|
|
2022-01-11 14:55:14 +03:00
|
|
|
|
# For the split release process these are not published to artifactory.
|
|
|
|
|
if [[ "$#" -lt 3 || $3 != "split" ]]; then
|
|
|
|
|
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
|
2022-01-17 17:40:20 +03:00
|
|
|
|
else
|
|
|
|
|
# For the split release process, we publish intermediate artifacts to the
|
|
|
|
|
# assembly repo, under the daml folder.
|
2022-01-17 20:33:44 +03:00
|
|
|
|
cd $STAGING_DIR/split-release
|
2022-01-25 18:41:55 +03:00
|
|
|
|
for d in split-release github; do
|
|
|
|
|
(
|
|
|
|
|
cd $d
|
|
|
|
|
for file in $(find . -type f); do
|
|
|
|
|
push assembly/daml $file
|
|
|
|
|
done
|
|
|
|
|
)
|
2022-01-17 17:40:20 +03:00
|
|
|
|
done
|
2022-01-11 14:55:14 +03:00
|
|
|
|
fi
|