daml/release/BUILD.bazel
Moritz Kiefer 644e76d047
Build a zip containing all protobuf files (#5412)
* Build a zip containing all protobuf files

This builds a fat zip that contains the DAML-LF protobuf files and
the Ledger API protobuf files for a given release.

I’ll tackle the Azure config for uploading this to github releases afterwards.

To ease reviewing this is how the resulting zip looks like:

```
Archive:  bazel-bin/release/protobufs.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     3593  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/package_service.proto
     1355  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/ledger_identity_service.proto
     6262  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/event.proto
     2282  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/testing/reset_service.proto
     1908  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/testing/time_service.proto
      886  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/ledger_offset.proto
     1327  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/transaction_filter.proto
     2380  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/command_submission_service.proto
     6208  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/transaction_service.proto
     3800  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/transaction.proto
     1506  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/completion.proto
     1893  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/ledger_configuration_service.proto
     5109  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/admin/party_management_service.proto
     3562  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/admin/package_management_service.proto
     3559  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/admin/config_management_service.proto
     5542  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/commands.proto
     4286  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/command_completion_service.proto
     2989  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/active_contracts_service.proto
     3393  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/command_service.proto
     5868  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/value.proto
     1810  2010-01-01 00:00   protos-0.0.0/com/digitalasset/ledger/api/v1/trace_context.proto
      558  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_6/daml_lf_0.proto
     1766  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_6/daml_lf.proto
    27265  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_6/daml_lf_1.proto
      558  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_7/daml_lf_0.proto
     1766  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_7/daml_lf.proto
    35657  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_7/daml_lf_1.proto
      558  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_8/daml_lf_0.proto
     1766  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_8/daml_lf.proto
    37168  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_1_8/daml_lf_1.proto
      596  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_dev/daml_lf_0.proto
     1804  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_dev/daml_lf.proto
    39864  2010-01-01 00:00   protos-0.0.0/com/digitalasset/daml_lf_dev/daml_lf_1.proto
```

changelog_begin
changelog_end

* Try to get tar from PATH

* Address review comments
2020-04-03 14:16:15 +02:00

67 lines
1.6 KiB
Python

# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load("//bazel_tools:haskell.bzl", "da_haskell_binary")
load("util.bzl", "protos_zip", "sdk_tarball")
load("@build_environment//:configuration.bzl", "sdk_version")
load("@os_info//:os_info.bzl", "is_windows")
da_haskell_binary(
name = "release",
srcs = glob(["src/**/*.hs"]) + ["//:SdkVersion.hs"],
hackage_deps = [
"aeson",
"async",
"ansi-terminal",
"base",
"base64-bytestring",
"bytestring",
"conduit",
"conduit-extra",
"containers",
"connection",
"cryptohash",
"directory",
"exceptions",
"extra",
"fast-logger",
"filepath",
"ghc",
"http-client",
"http-client-tls",
"http-conduit",
"http-types",
"lifted-async",
"lifted-base",
"monad-control",
"monad-logger",
"optparse-applicative",
"path",
"path-io",
"process",
"retry",
"safe",
"safe-exceptions",
"split",
"time",
"text",
"temporary",
"transformers",
"unliftio-core",
"unordered-containers",
"yaml",
"mtl",
"xml-conduit",
],
src_strip_prefix = "src",
visibility = ["//visibility:public"],
deps = [],
)
# Disabled on Windows since directory outputs can cause issues.
protos_zip(
name = "protobufs",
) if not is_windows else None
sdk_tarball("sdk-release-tarball", sdk_version)