Revert "Make symbol nuget package when use dotnet-cli"
authorWonYoung Choi <wy80.choi@samsung.com>
Thu, 20 Jul 2017 21:58:53 +0000 (06:58 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Thu, 20 Jul 2017 21:58:53 +0000 (06:58 +0900)
This reverts commit 530fd3cae94780c3a362efc3faf9b18c7b8f1d75.

Tizen.GBS.BuildTasks/Tizen.GBS.ImportAfter.targets
Tools/dotnet-build.sh
packaging/dotnet-build-tools.spec

index c22e896..be4fc94 100644 (file)
@@ -1,14 +1,55 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
+  <!-- UseTizenGBSImportAfterTarget -->
+  <PropertyGroup Condition="'$(UseTizenGBSImportAfterTarget)' == ''">
+    <UseTizenGBSImportAfterTarget>false</UseTizenGBSImportAfterTarget>
+    <UseTizenGBSImportAfterTarget Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == 'Tizen'">true</UseTizenGBSImportAfterTarget>
+  </PropertyGroup>
+
+  <!-- TargetFramework -->
+  <PropertyGroup Condition="'$(TargetFramework)' == ''">
+    <_ShortTargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">netstandard</_ShortTargetFrameworkIdentifier>
+    <_ShortTargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == 'Tizen'">tizen</_ShortTargetFrameworkIdentifier>
+    <_TargetFrameworkVersionWithoutV Condition="$(TargetFrameworkVersion.StartsWith('v'))">$(TargetFrameworkVersion.Substring(1))</_TargetFrameworkVersionWithoutV>
+    <TargetFramework Condition="'$(_ShortTargetFrameworkIdentifier)' != ''">$(_ShortTargetFrameworkIdentifier)$(_TargetFrameworkVersionWithoutV)</TargetFramework>
+  </PropertyGroup>
 
   <!-- Suppress missing XML comment warning -->
   <PropertyGroup>
     <NoWarn>$(NoWarn);1591</NoWarn>
   </PropertyGroup>
 
+  <!-- Modify BuildDependsOn -->
+  <PropertyGroup Condition="'$(UseTizenGBSImportAfterTarget)' == 'true'">
+    <BuildDependsOn>
+      $(BuildDependsOn);
+      __AppendNuGetAssemblyFiles;
+    </BuildDependsOn>
+  </PropertyGroup>
+
   <!-- DocumentationFile -->
-  <PropertyGroup>
+  <PropertyGroup Condition="'$(UseTizenGBSImportAfterTarget)' == 'true'">
     <DocumentationFile Condition="'$(DocumentationFile)' == ''">$(OutputPath)$(AssemblyName).xml</DocumentationFile>
   </PropertyGroup>
 
+  <!-- NuSpec File -->
+  <PropertyGroup>
+    <__NuSpecFile>$(MSBuildProjectDirectory)/$(AssemblyName).nuspec</__NuSpecFile>
+  </PropertyGroup>
+
+  <!-- Additional files to append to .nuspec -->
+  <ItemGroup>
+    <NuGetAssemblyFile Include="$(DocumentationFile)">
+      <TargetPath>lib/$(TargetFramework)</TargetPath>
+    </NuGetAssemblyFile>
+    <NuGetAssemblyFile Include="$(OutputPath)$(TargetFileName)">
+      <TargetPath>lib/$(TargetFramework)</TargetPath>
+    </NuGetAssemblyFile>
+  </ItemGroup>
+
+  <!-- Append _NuGetFiles to .nuspec file -->
+  <Target Name="__AppendNuGetAssemblyFiles" Condition="Exists('$(__NuSpecFile)')">
+    <Exec Command="dotnet-build nuspec_addfile &quot;$(__NuSpecFile)&quot; &quot;%(NuGetAssemblyFile.Identity)&quot; &quot;%(NuGetAssemblyFile.TargetPath)&quot;" />
+  </Target>
+
 </Project>
index c8ade71..bd967b4 100755 (executable)
@@ -121,7 +121,7 @@ cmd_pack() {
   if $USE_DOTNET_CLI; then
     [ -n "$CONFIGURATION" ] && OPTS="$OPTS -c $CONFIGURATION"
     [ -n "$VERSION" ] && OPTS="$OPTS /p:Version=$VERSION"
-    run_dotnet pack --no-restore --include-symbols $PROJECT $OPTS $@
+    run_dotnet pack --no-restore $PROJECT $OPTS $@
   else
     local NUSPEC=($PROJECT)
     if [ -d $PROJECT ]; then
index 6387c43..b3ce37e 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       dotnet-build-tools
 Summary:    Tools for building C# API projects
-Version:    1.3.0
+Version:    1.2.8
 Release:    1
 Group:      Development/Libraries
 License:    MIT and Apache-2.0