daml/ci/release.sh
gleber c095a2e20c Ledger api test tool release (#756)
* release: make 'ci/release.sh' runnable for dry runs.

release-dry-run.sh is outdated and duplicates logic from ci/release.sh, so it
got deleted.

* ledger-api-test-tool: release the tool together with the SDK components.

* ledger-api-test-tool: update docs to reflect distribution mechanism.

* ledger-api-test-tool: further docs refinements.

* Add Ledger API Test Tool mention into release notes.
2019-04-29 12:16:19 +00:00

43 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
## Functions
step() {
echo "step: $*" >&2
}
## Main
cd "$(dirname "$0")"/..
step "loading dev-env"
eval "$(dev-env/bin/dade assist)"
# build
step "build release script"
bazel build //release:release
# set up temp location
step "set up temporary location"
release_dir="$(mktemp -d)"
step "temporary release directory is ${release_dir}"
if [[ "${BUILD_SOURCEBRANCHNAME:-}" == "master" ]]; then
# set up bintray credentials
mkdir -p ~/.jfrog
echo "$JFROG_CONFIG_CONTENT" > ~/.jfrog/jfrog-cli.conf
unset JFROG_CONFIG_CONTENT
step "run release script (with --upload)"
./bazel-bin/release/release --artifacts release/artifacts.yaml --upload --log-level debug --release-dir "${release_dir}"
else
step "run release script (dry run)"
./bazel-bin/release/release --artifacts release/artifacts.yaml --log-level debug --release-dir "${release_dir}"
step "release artifacts got stored in ${release_dir}"
fi