daml/compatibility/build-ts-libs.sh
Moritz Kiefer 4916a28682
Include create-daml-app tests in compatibility tests (#5945)
This is the first part of #5700

It adds tests that build create-daml-app using `daml build` and then
run the codegen and build the UI. Contrary to our main tests these
also run on Windows. This is actually reasonably simple by first
building the typescript libraries on Linux and then downloading them
on Windows.

There are two parts that are still missing from the tests in the main
workspace:

1. Building the extra feature. This should be fairly easy to add.
2. Running the pupeeter tests. At least MacOS and Linux should be
   reasonably easy. I don’t know what horrors Windows will throw at
   us. This step is what actually makes this a compatibility
   test. Currently it doesn’t actually launch Sandbox and the JSON API.

Since this PR is already pretty large, I’d like to tackle those things
separately.

changelog_begin
changelog_end
2020-05-13 10:39:51 +02:00

26 lines
815 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -eou pipefail
cd "$(dirname "$0")/.."
eval "$(./dev-env/bin/dade-assist)"
# We allow overwriting this since on CI we build this in a separate step and upload it first
# before fetching it in another step.
HEAD_TARGET_DIR=${1:-compatibility/head_sdk}
function cleanup {
rm -rf "daml-types-0.0.0.tar.gz" "daml-ledger-0.0.0.tar.gz" "daml-react-0.0.0.tar.gz"
}
trap cleanup EXIT
bazel run //language-support/ts/daml-types:npm_package.pack
bazel run //language-support/ts/daml-ledger:npm_package.pack
bazel run //language-support/ts/daml-react:npm_package.pack
cp -f daml-types-0.0.0.tgz daml-react-0.0.0.tgz daml-ledger-0.0.0.tgz "$HEAD_TARGET_DIR"