diff --git a/templates/BUILD.bazel b/templates/BUILD.bazel index 6f820ab37495..57277425d1fc 100644 --- a/templates/BUILD.bazel +++ b/templates/BUILD.bazel @@ -43,7 +43,7 @@ genrule( [ "default-gitattributes", "default-gitignore", - "default-dlint-yaml", + "default-dlint.yaml", "skeleton/**", "empty-skeleton/**", "create-daml-app/**", @@ -68,10 +68,13 @@ genrule( for d in skeleton empty-skeleton create-daml-app quickstart-scala quickstart-java; do mkdir -p $$OUT/$$d cp -rL $$SRC/$$d/* $$OUT/$$d/ - # use default .gitignore and .dlint.yaml if they don't exist in the template - cp -n $$SRC/default-gitattributes $$OUT/$$d/.gitattributes - cp -n $$SRC/default-gitignore $$OUT/$$d/.gitignore - cp -n $$SRC/default-dlint-yaml $$OUT/$$d/.dlint.yaml + for f in gitattributes gitignore dlint.yaml; do + if [ -f "$$SRC/$$d/.$$f" ]; then + cp "$$SRC/$$d/.$$f" "$$OUT/$$d/.$$f" + else + cp "$$SRC/default-$$f" "$$OUT/$$d/.$$f" + fi + done # We avoid introducing infix syntax in the GSG so we disable # the lint there. if [ "$$d" = "create-daml-app" ]; then diff --git a/templates/NO_AUTO_COPYRIGHT b/templates/NO_AUTO_COPYRIGHT new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/templates/default-dlint-yaml b/templates/default-dlint.yaml similarity index 100% rename from templates/default-dlint-yaml rename to templates/default-dlint.yaml