Set AssemblyVersion to 1.0.0.0 as default
authorWonYoung Choi <wy80.choi@samsung.com>
Thu, 20 Jul 2017 22:31:51 +0000 (07:31 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Thu, 20 Jul 2017 22:31:51 +0000 (07:31 +0900)
Change-Id: Ie481e542a9501534228bee0014174dd9fb6df72c

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

index be4fc94..b9cd062 100644 (file)
@@ -1,55 +1,14 @@
 <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>
+  <PropertyGroup Condition=" '$(UsingRPMMacro)' == 'true' ">
 
-  <!-- Suppress missing XML comment warning -->
-  <PropertyGroup>
+    <!-- DocumentationFile -->
     <NoWarn>$(NoWarn);1591</NoWarn>
-  </PropertyGroup>
-
-  <!-- Modify BuildDependsOn -->
-  <PropertyGroup Condition="'$(UseTizenGBSImportAfterTarget)' == 'true'">
-    <BuildDependsOn>
-      $(BuildDependsOn);
-      __AppendNuGetAssemblyFiles;
-    </BuildDependsOn>
-  </PropertyGroup>
-
-  <!-- DocumentationFile -->
-  <PropertyGroup Condition="'$(UseTizenGBSImportAfterTarget)' == 'true'">
     <DocumentationFile Condition="'$(DocumentationFile)' == ''">$(OutputPath)$(AssemblyName).xml</DocumentationFile>
-  </PropertyGroup>
 
-  <!-- NuSpec File -->
-  <PropertyGroup>
-    <__NuSpecFile>$(MSBuildProjectDirectory)/$(AssemblyName).nuspec</__NuSpecFile>
-  </PropertyGroup>
+    <!-- Assembly Version -->
+    <AssemblyVersion Condition="'$(AssemblyVersion)' == ''">1.0.0.0</AssemblyVersion>
 
-  <!-- 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>
+  </PropertyGroup>
 
 </Project>
index b9e636f..640b452 100755 (executable)
@@ -105,7 +105,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 $PROJECT $OPTS $@
+    run_dotnet pack --no-restore --no-build $PROJECT $OPTS $@
   else
     local NUSPEC=($PROJECT)
     if [ -d $PROJECT ]; then
index b3ce37e..f893025 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       dotnet-build-tools
 Summary:    Tools for building C# API projects
-Version:    1.2.8
+Version:    1.2.9
 Release:    1
 Group:      Development/Libraries
 License:    MIT and Apache-2.0
@@ -65,8 +65,6 @@ cp -fr ./dotnet/* %{buildroot}%{CLI_PATH}
 ln -s %{CLI_PATH}/dotnet %{buildroot}%{_bindir}/dotnet
 
 # Tizen.GBS.BuildTasks
-mkdir -p %{buildroot}%{XBUILD_PATH}/14.0/Microsoft.Common.targets/ImportAfter
-install -p -m 644 Tizen.GBS.BuildTasks/Tizen.GBS.ImportAfter.targets %{buildroot}%{XBUILD_PATH}/14.0/Microsoft.Common.targets/ImportAfter
 install -p -m 644 Tizen.GBS.BuildTasks/Tizen.GBS.ImportAfter.targets %{buildroot}%{CLI_PATH}/sdk/*/15.0/Microsoft.Common.targets/ImportAfter
 
 # NuGet
index 9cd4b95..6e5cd20 100644 (file)
@@ -46,11 +46,11 @@ dotnet-build -s %{-s:%{-s*}}%{!-s:%{_dotnet_nuget_source}} restore %{1} %{?2} %{
 %{nil}
 
 %dotnet_build(s:) \
-dotnet-build -c %{_dotnet_build_conf} -s %{-s:%{-s*}}%{!-s:%{_dotnet_nuget_source}} build %{1} %{?2} %{?3} %{?4} %{?5} %{?6} \
+dotnet-build -c %{_dotnet_build_conf} -s %{-s:%{-s*}}%{!-s:%{_dotnet_nuget_source}} build %{1} /p:UsingRPMMacro=true %{?2} %{?3} %{?4} %{?5} %{?6} \
 %{nil}
 
 %dotnet_pack() \
-dotnet-build -c %{_dotnet_build_conf} %{?2:-v %{2}} pack %{1} %{?3} %{?4} %{?5} %{?6} %{?7} \
+dotnet-build -c %{_dotnet_build_conf} %{?2:-v %{2}} pack %{1} /p:UsingRPMMacro=true %{?3} %{?4} %{?5} %{?6} %{?7} \
 %{nil}
 
 %dotnet_install_assembly() \