mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
dbddead461
* Add a first draft of documentation for DAML triggers The API will still change in a bunch of ways but I’d rather get some docs in place now and update them as we change things than not have any docs at all. * Fix path to daml.yaml * s/bot/trigger/ * fix source code markers * Fix tests * Update docs/source/triggers/index.rst Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
54 lines
1.9 KiB
Python
54 lines
1.9 KiB
Python
# Copyright (c) 2019 The DAML Authors. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
genrule(
|
|
name = "templates-tarball",
|
|
srcs = glob([
|
|
"default-gitignore",
|
|
"default-dlint-yaml",
|
|
"skeleton/**",
|
|
"migrate/**",
|
|
"quickstart-java/**",
|
|
"quickstart-scala/**",
|
|
]) + [
|
|
"//docs:quickstart-java.tar.gz",
|
|
"//docs:daml-intro-templates",
|
|
"//docs:copy-trigger-template",
|
|
"//language-support/scala/examples:quickstart-scala-dir",
|
|
],
|
|
outs = ["templates-tarball.tar.gz"],
|
|
cmd = """
|
|
SRC=templates
|
|
OUT=templates-tarball
|
|
|
|
# templates in templates dir
|
|
for d in skeleton migrate quickstart-scala quickstart-java; do
|
|
mkdir -p $$OUT/$$d
|
|
cp -rL $$SRC/$$d/* $$OUT/$$d/
|
|
cp $$SRC/default-gitignore $$OUT/$$d/.gitignore
|
|
cp $$SRC/default-dlint-yaml $$OUT/$$d/.dlint.yaml
|
|
done
|
|
|
|
## special cases we should work to remove
|
|
|
|
# quickstart-java template
|
|
# right now, uses the preexisting quickstart-java rule and replaces the
|
|
# da.yaml template with a daml.yaml template; in the future, move
|
|
# everything into //templates/quickstart-java and avoid untar, rm here
|
|
tar xf $(location //docs:quickstart-java.tar.gz) --strip-components=1 -C $$OUT/quickstart-java
|
|
rm $$OUT/quickstart-java/da-skeleton.yaml
|
|
|
|
# quickstart-scala template
|
|
cp -r $(location //language-support/scala/examples:quickstart-scala-dir)/* $$OUT/quickstart-scala/
|
|
|
|
# daml intro templates
|
|
tar xf $(location //docs:daml-intro-templates) -C $$OUT
|
|
|
|
mkdir -p $$OUT/copy-trigger
|
|
tar xf $(location //docs:copy-trigger-template) -C $$OUT/copy-trigger
|
|
|
|
tar zcf $(location :templates-tarball.tar.gz) templates-tarball
|
|
""",
|
|
visibility = ["//visibility:public"],
|
|
)
|