mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
c095a2e20c
* 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.
43 lines
1.1 KiB
Bash
Executable File
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
|