mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
d88b8b471e
* DAML Intro Sections 1 - 7 * Apply suggestions from code review Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com> * Address Beth's comments * Rebase and fix release notes * Add suggestions for Haskell reading
49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
genrule(
|
|
name = "templates-tarball",
|
|
srcs = glob([
|
|
"skeleton/**",
|
|
"migrate/**",
|
|
"quickstart-java/**",
|
|
"quickstart-scala/**",
|
|
]) + [
|
|
"//docs:quickstart-java.tar.gz",
|
|
"//docs:daml-intro-templates",
|
|
"//language-support/scala/examples:quickstart-scala-dir",
|
|
],
|
|
outs = ["templates-tarball.tar.gz"],
|
|
cmd = """
|
|
SRC=templates
|
|
OUT=templates-tarball
|
|
|
|
# skeleton template
|
|
mkdir -p $$OUT/skeleton
|
|
cp -rL $$SRC/skeleton/* $$OUT/skeleton/
|
|
|
|
# migrate template
|
|
mkdir -p $$OUT/migrate
|
|
cp -rL $$SRC/migrate/* $$OUT/migrate/
|
|
|
|
# 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
|
|
mkdir -p $$OUT/quickstart-java
|
|
tar xf $(location //docs:quickstart-java.tar.gz) --strip-components=1 -C $$OUT/quickstart-java
|
|
rm $$OUT/quickstart-java/da-skeleton.yaml
|
|
cp -rL $$SRC/quickstart-java/* $$OUT/quickstart-java/
|
|
|
|
# quickstart-scala template
|
|
mkdir -p $$OUT/quickstart-scala
|
|
cp -r $(location //language-support/scala/examples:quickstart-scala-dir)/* $$OUT/quickstart-scala/
|
|
cp -rL $$SRC/quickstart-scala/* $$OUT/quickstart-scala/
|
|
|
|
# daml intro templates
|
|
tar xf $(location //docs:daml-intro-templates) -C $$OUT
|
|
|
|
tar zcf $(location :templates-tarball.tar.gz) templates-tarball
|
|
""",
|
|
visibility = ["//visibility:public"],
|
|
)
|