Skip to content

Commit

Permalink
simplifying targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijeet Shah committed Apr 20, 2017
1 parent 08ff5dc commit b568cf3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 21 deletions.
5 changes: 1 addition & 4 deletions AzSdk.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="DebugBuildOptions" Condition=" '$(Configuration)|$(Platform)'=='Debug|AnyCPU' ">
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Label="ReleaseBuildOptions" Condition=" '$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<DelaySign>false</DelaySign>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
<Target Name="PublishNuget" DependsOnTargets="$(PublishNugetDependsOn)" />
<Target Name="RunTests" DependsOnTargets="$(RunTestProjectsDependsOn)" />
<Target Name="SignNuget" DependsOnTargets="$(SignNugetDependsOn)" />
<Target Name="Help" DependsOnTargets="$(HelpDependsOn)" />
</Project>
4 changes: 2 additions & 2 deletions src/SDKs/Cdn/Cdn.Tests/Cdn.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.ResourceManager" Version="1.1.0-preview" />

<ProjectReference Include="..\Management.Cdn\Microsoft.Azure.Management.Cdn.csproj" />
<!--<PackageReference Include="Microsoft.Azure.Management.Cdn" Version="3.1.0-preview" />-->
<!--<ProjectReference Include="..\Management.Cdn\Microsoft.Azure.Management.Cdn.csproj" />-->
<PackageReference Include="Microsoft.Azure.Management.Cdn" Version="3.0.1-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 4 additions & 13 deletions test.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
<NugetCommonProfileTags>RandomTag</NugetCommonProfileTags>
<NugetCommonProfileTags/>
<PackageOutputPath>$(BuiltPackageOutputDir)</PackageOutputPath>
<AddProjectReferenceForDebuggingPurpose>false</AddProjectReferenceForDebuggingPurpose>
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">1.1.0</RuntimeFrameworkVersion>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'net452' ">$(PackageTargetFallback);net452;dnxcore50</PackageTargetFallback>
</PropertyGroup>
<PropertyGroup Label="DebugBuildOptions" Condition=" '$(Configuration)|$(Platform)'=='Debug|AnyCPU' ">
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Label="ReleaseBuildOptions" Condition=" '$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<DelaySign>false</DelaySign>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>FullNetFx</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand All @@ -39,8 +30,8 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
<!-- <PackageReference Include="Microsoft.NETCore.App" Version="1.0.2" /> -->
</ItemGroup>
<!-- <ItemGroup> -->
<!-- <Compile Include="$(LibraryToolsFolder)\DisableTestRunParallel.cs" Link="DisableTestRunParallel.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" /> -->
<!-- </ItemGroup> -->
<ItemGroup>
<Compile Include="$(LibraryToolsFolder)\DisableTestRunParallel.cs" Link="DisableTestRunParallel.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>

</Project>
22 changes: 20 additions & 2 deletions tools/buildTargets/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
Package;
PublishingNuget
</PublishNugetDependsOn>

<HelpDependsOn>
DisplayHelp
</HelpDependsOn>

</PropertyGroup>

Expand Down Expand Up @@ -214,12 +218,26 @@
<Message Text="Categorized SDK Scoped Projects ..... @(ScopedProjects)" Condition=" '$(Scope)' != 'All'" />
<Message Text="Categorized Test Scoped Projects ..... @(ScopedTestProjects)" Condition=" '$(Scope)' != 'All'" />
<Message Text="Categorized SDK Projects ..... @(SDKProject)" Condition=" '$(Scope)' == 'All'" />
<Message Text="Categorized Test Projects ..... @(SDKTestProject)" Condition=" '$(Scope)' == 'All'" />

<Message Text="Categorized Test Projects ..... @(SDKTestProject)" Condition=" '$(Scope)' == 'All'" />
<!--
<ScopedProjects Remove="@(KVSamples)"/>
-->
</Target>

<Target Name="DisplayHelp">
<Message Text="msbuild build.proj /t:Build"/>
<Message Text="---- will build and create nuget pacakge for the entire repo"/>

<Message Text="msbuild build.proj /t:Build /p:Scope=SDKs\Compute" />
<Message Text="---- will build Microsoft.Azure.Management.Compute and Compute.Tests project and create nuget pacakge for Compute"/>

<Message Text="msbuild build.proj /t:RunTests" />
<Message Text="----- will Build and Run tests for the entire repo" />

<Message Text="msbuild build.proj /t:RunTests /p:Scope=SDKs\Compute" />
<Message Text="----- will Build Compute nuget package and run compute test" />
</Target>

<Target Name="GetScopedProjects" Condition=" '$(Scope)' != 'All'">
<ItemGroup>
<SDKProject Include="@(ScopedProjects)" />
Expand Down

0 comments on commit b568cf3

Please sign in to comment.