Skip to content

Commit

Permalink
Updating build files to accomodate latest updates of separating build…
Browse files Browse the repository at this point in the history
… files out of main branch. Adding signed build tasks binaries. Updating bash script for similar changes needed for travis. (Azure#4394)
  • Loading branch information
shahabhijeet authored May 31, 2018
1 parent 8e7f2ff commit dfeb2c9
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 84 deletions.
59 changes: 14 additions & 45 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,47 +1,16 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot>
<LibrarySourceFolder>$(LibraryRoot)src</LibrarySourceFolder>
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder>
<LibraryNugetPackageFolder>$(LibraryRoot)restoredPackages</LibraryNugetPackageFolder>
<LibraryFriendlyName>Microsoft Azure Management Libraries</LibraryFriendlyName>
<AuthenticationSolution>src\Authentication\Authentication.sln</AuthenticationSolution>
<ManagementLibrariesSolution>AzureManagementLibraries.sln</ManagementLibrariesSolution>
<BinariesFolder>$(LibraryRoot)binaries</BinariesFolder>
<BuildAssetsDir>$(LibraryToolsFolder)\BuildAssets</BuildAssetsDir>
<PoliCheckOutputDir>$(LibraryRoot)PolicheckOutput</PoliCheckOutputDir>
<BuiltPackageOutputDir>$(BinariesFolder)\packages</BuiltPackageOutputDir>
<DelaySign Condition =" '$(DelaySign)' == '' ">false</DelaySign>
<CodeSign Condition=" '$(CodeSign)' == '' ">false</CodeSign>
<Scope Condition=" '$(Scope)' == '' ">All</Scope>
<NuGetCommand>&quot;$(LibraryToolsFolder)\nuget.exe&quot;</NuGetCommand>
<NuGetKey Condition=" '$(NuGetKey)' == '' ">1234</NuGetKey>
<BuildInParallel>true</BuildInParallel>
<SdkBuildToolsDir>$(LibraryToolsFolder)\SdkBuildTools</SdkBuildToolsDir>
<NugetPackageName/>
<ImportDirectoryBuildTargets>true</ImportDirectoryBuildTargets>
</PropertyGroup>
<PropertyGroup>
<CIToolsPath>$(OnPremiseBuildTasks)</CIToolsPath>
<OnPremiseBuild Condition=" Exists($(OnPremiseBuildTasks)) ">true</OnPremiseBuild>
<OnPremiseBuild Condition=" ! Exists($(OnPremiseBuildTasks)) ">false</OnPremiseBuild>
</PropertyGroup>

<PropertyGroup Label="Well Known Properties">
<ClientRuntimeRootDir>$(LibraryRoot)src\UpgradeVS17\SdkCommon\ClientRuntime</ClientRuntimeRootDir>
<SdkCommonRootDir>$(LibraryRoot)src\UpgradeVS17\SdkCommon\ClientRuntime</SdkCommonRootDir>
</PropertyGroup>

<PropertyGroup>
<NetSdkBuildTargetsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)\targets</NetSdkBuildTargetsDir>
<NetSdkBuildTargetsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildTargetsDir)' == '' ">$(SdkBuildToolsDir)\targets</NetSdkBuildTargetsDir>
<!-- <NetSdkBuildTargetsDir Condition=" '$(NetSdkBuildTargetsDir)' == '' ">$(LibraryToolsFolder)\buildTargets</NetSdkBuildTargetsDir> -->

<NetSdkBuildToolsDir Condition="Exists('$(BuildAssetsDir)')">$(BuildAssetsDir)</NetSdkBuildToolsDir>
<NetSdkBuildToolsDir Condition="Exists('$(SdkBuildToolsDir)')">$(SdkBuildToolsDir)</NetSdkBuildToolsDir>
<!-- <NetSdkBuildToolsDir Condition=" '$(NetSdkBuildToolsDir)' == '' ">$(LibraryToolsFolder)\buildTargets</NetSdkBuildToolsDir> -->
</PropertyGroup>

<Import Condition="Exists('$(NetSdkBuildTargetsDir)\common.Build.props')" Project="$(NetSdkBuildTargetsDir)\common.Build.props"/>
<Import Condition="Exists('$(NetSdkBuildTargetsDir)\common.NugetPackage.props')" Project="$(NetSdkBuildTargetsDir)\common.NugetPackage.props"/>
<PropertyGroup>
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot>
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder>
<BuildAssetsDir>$(LibraryToolsFolder)\BuildAssets</BuildAssetsDir>
<SdkBuildToolsDir>$(LibraryToolsFolder)\SdkBuildTools</SdkBuildToolsDir>
</PropertyGroup>
<PropertyGroup>
<NetSdkBuildTargetsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)\targets</NetSdkBuildTargetsDir>
<NetSdkBuildTargetsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildTargetsDir)' == '' ">$(SdkBuildToolsDir)\targets</NetSdkBuildTargetsDir>
<NetSdkBuildToolsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)</NetSdkBuildToolsDir>
<NetSdkBuildToolsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildToolsDir)' == '' ">$(SdkBuildToolsDir)</NetSdkBuildToolsDir>
</PropertyGroup>

<Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.props" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.props') "/>
</Project>
3 changes: 1 addition & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Condition="Exists('$(NetSdkBuildTargetsDir)\common.targets')" Project="$(NetSdkBuildTargetsDir)\common.targets" />
<Import Condition="Exists('$(NetSdkBuildTargetsDir)\ideCmd.targets')" Project="$(NetSdkBuildTargetsDir)\ideCmd.targets" />
<Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets') "/>
<Import Project="tools\bootstrapTools\bootstrap.targets" />
</Project>
15 changes: 3 additions & 12 deletions build.proj
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
<Project DefaultTargets="Init" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Init" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Directory.Build.props" />
<Import Project="test.props" />
<Import Project="AzSdk.props" />
<Import Project="Directory.Build.targets" />

<Target Name="Clean" DependsOnTargets="$(CleanTraversedProjectsDependsOn)" />
<Target Name="Restore" DependsOnTargets="$(RestoreTraversedProjectsDependsOn)" />
<Target Name="Build" DependsOnTargets="$(BuildTraversedProjectsDependsOn)" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="PublishNuget" DependsOnTargets="$(PublishNugetDependsOn)" />
<Target Name="CreateNugetPackage" DependsOnTargets="$(PackageNugetDependsOn)" />
<Target Name="RunTests" DependsOnTargets="$(RunTestProjectsDependsOn)" />
<Target Name="SignNuget" DependsOnTargets="$(SignNugetDependsOn)" />
<Target Name="Help" DependsOnTargets="$(HelpDependsOn)" />
</Project>
<Import Project="$(NetSdkBuildTargetsDir)\core\_build.proj" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_build.proj') "/>
</Project>
21 changes: 1 addition & 20 deletions test.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
<NugetCommonProfileTags/>
<PackageOutputPath>$(BuiltPackageOutputDir)</PackageOutputPath>
<AddProjectReferenceForDebuggingPurpose>false</AddProjectReferenceForDebuggingPurpose>
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(LibraryToolsFolder)\DisableTestRunParallel.cs" Link="DisableTestRunParallel.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>
<Import Project="$(NetSdkBuildTargetsDir)\core\_test.props" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_test.props') "/>
</Project>
15 changes: 10 additions & 5 deletions testSdkOnLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ skip_Rps() {
}

getBuildTools() {
copyFromRootDir="https://raw.githubusercontent.com/Azure/azure-sdk-for-net/NetSdkBuild"
copyFromRootDir="https://raw.githubusercontent.com/Azure/azure-sdk-for-net/SdkBuildTools"
printf "Updating Build tools .....\n"

if [ ! -d ./tools/SdkBuildTools ]; then
Expand All @@ -179,6 +179,10 @@ getBuildTools() {
mkdir ./tools/SdkBuildTools/targets
fi

if [ ! -d ./tools/SdkBuildTools/targets/core ]; then
mkdir ./tools/SdkBuildTools/targets/core
fi

if [ ! -d ./tools/SdkBuildTools/tasks ]; then
mkdir ./tools/SdkBuildTools/tasks
fi
Expand All @@ -193,12 +197,13 @@ getBuildTools() {
curl -s $copyFromRootDir/tools/BuildAssets/targets/common.targets > ./tools/SdkBuildTools/targets/common.targets
curl -s $copyFromRootDir/tools/BuildAssets/targets/signing.targets > ./tools/SdkBuildTools/targets/signing.targets
curl -s $copyFromRootDir/tools/BuildAssets/targets/ideCmd.targets > ./tools/SdkBuildTools/targets/ideCmd.targets
curl -s $copyFromRootDir/tools/BuildAssets/targets/core/_AzSdk.props > ./tools/SdkBuildTools/targets/core/_AzSdk.props
curl -s $copyFromRootDir/tools/BuildAssets/targets/core/_build.proj > ./tools/SdkBuildTools/targets/core/_build.proj
curl -s $copyFromRootDir/tools/BuildAssets/targets/core/_Directory.Build.props > ./tools/SdkBuildTools/targets/core/_Directory.Build.props
curl -s $copyFromRootDir/tools/BuildAssets/targets/core/_Directory.Build.targets > ./tools/SdkBuildTools/targets/core/_Directory.Build.targets
curl -s $copyFromRootDir/tools/BuildAssets/targets/core/_test.props > ./tools/SdkBuildTools/targets/core/_test.props
curl -s $copyFromRootDir/tools/BuildAssets/tasks/common.tasks > ./tools/SdkBuildTools/tasks/common.tasks
#curl $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Azure.Build.BootstrapTasks.dll > ./tools/SdkBuildTools/tasks/net46/Microsoft.Azure.Build.BootstrapTasks.dll
#curl $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Azure.Build.BootstrapTasks.runtimeconfig.dev.json > ./tools/SdkBuildTools/tasks/net46/Microsoft.Azure.Build.BootstrapTasks.runtimeconfig.dev.json
#curl $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Azure.Build.BootstrapTasks.runtimeconfig.json > ./tools/SdkBuildTools/tasks/net46/Microsoft.Azure.Build.BootstrapTasks.runtimeconfig.json
curl -s $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Azure.Sdk.Build.Tasks.dll > ./tools/SdkBuildTools/tasks/net46/Microsoft.Azure.Sdk.Build.Tasks.dll
#curl -s $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Azure.Sdk.Build.Tasks.runtimeconfig.dev.json > ./tools/SdkBuildTools/tasks/net46/Microsoft.Azure.Sdk.Build.Tasks.runtimeconfig.dev.json
curl -s $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Build.dll > ./tools/SdkBuildTools/tasks/net46/Microsoft.Build.dll
curl -s $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Build.Framework.dll > ./tools/SdkBuildTools/tasks/net46/Microsoft.Build.Framework.dll
curl -s $copyFromRootDir/tools/BuildAssets/tasks/net46/Microsoft.Build.Tasks.Core.dll > ./tools/SdkBuildTools/tasks/net46/Microsoft.Build.Tasks.Core.dll
Expand Down
Binary file not shown.

0 comments on commit dfeb2c9

Please sign in to comment.