2020-04-28 17:06:36 +03:00
|
|
|
Set-StrictMode -Version latest
|
|
|
|
$ErrorActionPreference = 'Stop'
|
2021-01-07 13:48:59 +03:00
|
|
|
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2020-04-28 17:06:36 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
# Build the release artifacts required for running the compatibility
|
|
|
|
# tests against HEAD. At the moment this includes the SDK release tarball
|
|
|
|
# and the ledger-api-test-tool fat JAR.
|
|
|
|
|
|
|
|
# See https://github.com/lukesampson/scoop/issues/3859
|
|
|
|
Set-Strictmode -Off
|
|
|
|
.\dev-env\windows\bin\dadew.ps1 install
|
|
|
|
Set-StrictMode -Version latest
|
|
|
|
.\dev-env\windows\bin\dadew.ps1 sync
|
|
|
|
.\dev-env\windows\bin\dadew.ps1 enable
|
|
|
|
|
|
|
|
if (Test-Path -Path $env:appdata\stack\pantry\hackage\hackage-security-lock) {
|
|
|
|
Write-Output ">> Nuking stack directory"
|
|
|
|
Remove-Item -ErrorAction Continue -Force -Recurse -Path $env:appdata\stack
|
|
|
|
}
|
|
|
|
|
2020-05-05 13:23:11 +03:00
|
|
|
$ARTIFACT_DIRS = if ("$env:BUILD_ARTIFACTSTAGINGDIRECTORY") { $env:BUILD_ARTIFACTSTAGINGDIRECTORY } else { Get-Location }
|
|
|
|
|
2020-04-28 17:06:36 +03:00
|
|
|
function bazel() {
|
|
|
|
Write-Output ">> bazel $args"
|
|
|
|
$global:lastexitcode = 0
|
|
|
|
$backupErrorActionPreference = $script:ErrorActionPreference
|
|
|
|
$script:ErrorActionPreference = "Continue"
|
|
|
|
& bazel.exe @args 2>&1 | %{ "$_" }
|
|
|
|
$script:ErrorActionPreference = $backupErrorActionPreference
|
|
|
|
if ($global:lastexitcode -ne 0 -And $args[0] -ne "shutdown") {
|
|
|
|
Write-Output "<< bazel $args (failed, exit code: $global:lastexitcode)"
|
|
|
|
throw ("Bazel returned non-zero exit code: $global:lastexitcode")
|
|
|
|
}
|
|
|
|
Write-Output "<< bazel $args (ok)"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bazel shutdown
|
|
|
|
bazel fetch @nodejs_dev_env//...
|
|
|
|
bazel build `
|
2020-05-05 13:23:11 +03:00
|
|
|
`-`-experimental_execution_log_file ${ARTIFACT_DIRS}/build_execution_windows.log `
|
2020-04-28 17:06:36 +03:00
|
|
|
//release:sdk-release-tarball `
|
|
|
|
//ledger/ledger-api-test-tool:ledger-api-test-tool_deploy.jar
|
|
|
|
|
2021-03-11 18:13:49 +03:00
|
|
|
git clean -fxd -e 'daml-*.tgz' compatibility/head_sdk
|
|
|
|
|
2021-03-11 16:49:48 +03:00
|
|
|
cp -Force bazel-bin\release\sdk-release-tarball-ce.tar.gz compatibility/head_sdk
|
2020-04-28 17:06:36 +03:00
|
|
|
cp -Force bazel-bin\ledger\ledger-api-test-tool\ledger-api-test-tool_deploy.jar compatibility/head_sdk
|
2020-05-18 15:37:16 +03:00
|
|
|
cp -Force templates\create-daml-app-test-resources\messaging.patch compatibility/head_sdk
|