From 5bfcb5cc0911daf100166172f71b19482f18b82b Mon Sep 17 00:00:00 2001
From: Jan Tattermusch <jtattermusch@google.com>
Date: Fri, 9 Sep 2016 13:21:46 +0200
Subject: [PATCH] fix copying data directory

---
 .../Grpc.IntegrationTesting.Client/project.json  |  8 ++++++--
 .../project.json                                 |  8 ++++++--
 .../Grpc.IntegrationTesting.Server/project.json  |  8 ++++++--
 .../project.json                                 |  8 ++++++--
 src/csharp/Grpc.IntegrationTesting/project.json  |  8 ++++++--
 templates/src/csharp/build_options.include       | 16 ++++++++++------
 6 files changed, 40 insertions(+), 16 deletions(-)

diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json
index 81faee63dc..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.Client/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json
@@ -13,8 +13,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
index 81faee63dc..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
@@ -13,8 +13,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json
index 81faee63dc..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.Server/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json
@@ -13,8 +13,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
index 81faee63dc..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
@@ -13,8 +13,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json
index db91a1614c..0225abb414 100644
--- a/src/csharp/Grpc.IntegrationTesting/project.json
+++ b/src/csharp/Grpc.IntegrationTesting/project.json
@@ -13,8 +13,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          "include": "data/*",
           "mappings": {
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
diff --git a/templates/src/csharp/build_options.include b/templates/src/csharp/build_options.include
index 2371f5a3c3..bda2d76074 100644
--- a/templates/src/csharp/build_options.include
+++ b/templates/src/csharp/build_options.include
@@ -16,10 +16,12 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          % if includeData:
-          "include": "data/*",
-          % endif
           "mappings": {
+            % if includeData:
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
+            % endif
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -38,10 +40,12 @@
           "includeFiles": [ "../Grpc.Core/Version.cs" ]
         },
         "copyToOutput": {
-          % if includeData:
-          "include": "data/*",
-          % endif
           "mappings": {
+            % if includeData:
+            "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+            "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+            "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
+            % endif
             "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
             "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
             "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
-- 
GitLab