First try at refactor of Prepare.targets (#5647)
* First try at refactor of Prepare.targets * Enable restore of CLI build tasks * Fix up build * Feedback * Newlines * Add new props to sln * CommitCount * NuGet.config * WorkingDir * packages dir path * Add missing nuget.configs * Workaround for https://github.com/NuGet/Home/issues/4583 * Match NuGet.Config casing * Put back Version Badge Properties * Remove duplicate
This commit is contained in:
parent
3806eeb151
commit
a101c703a1
21 changed files with 162 additions and 118 deletions
|
@ -24,24 +24,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestPackages", "TestPackage
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4-BC0F-443B-8ADF-691321F10108}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\Microsoft.DotNet.Cli.Branding.props = build\Microsoft.DotNet.Cli.Branding.props
|
||||
build\Microsoft.DotNet.Cli.BranchInfo.props = build\Microsoft.DotNet.Cli.BranchInfo.props
|
||||
build\Microsoft.DotNet.Cli.BundledSdks.proj = build\Microsoft.DotNet.Cli.BundledSdks.proj
|
||||
build\Microsoft.DotNet.Cli.BundledSdks.props = build\Microsoft.DotNet.Cli.BundledSdks.props
|
||||
build\Microsoft.DotNet.Cli.BundledTemplates.proj = build\Microsoft.DotNet.Cli.BundledTemplates.proj
|
||||
build\Microsoft.DotNet.Cli.BundledTemplates.props = build\Microsoft.DotNet.Cli.BundledTemplates.props
|
||||
build\Microsoft.DotNet.Cli.Compile.targets = build\Microsoft.DotNet.Cli.Compile.targets
|
||||
build\Microsoft.DotNet.Cli.DependencyVersions.props = build\Microsoft.DotNet.Cli.DependencyVersions.props
|
||||
build\Microsoft.DotNet.Cli.FileExtensions.props = build\Microsoft.DotNet.Cli.FileExtensions.props
|
||||
build\Microsoft.DotNet.Cli.GitCommitInfo.targets = build\Microsoft.DotNet.Cli.GitCommitInfo.targets
|
||||
build\Microsoft.DotNet.Cli.HostInfo.targets = build\Microsoft.DotNet.Cli.HostInfo.targets
|
||||
build\Microsoft.DotNet.Cli.InitRepo.props = build\Microsoft.DotNet.Cli.InitRepo.props
|
||||
build\Microsoft.DotNet.Cli.InitRepo.targets = build\Microsoft.DotNet.Cli.InitRepo.targets
|
||||
build\Microsoft.DotNet.Cli.Monikers.props = build\Microsoft.DotNet.Cli.Monikers.props
|
||||
build\Microsoft.DotNet.Cli.OutputDirectories.props = build\Microsoft.DotNet.Cli.OutputDirectories.props
|
||||
build\Microsoft.DotNet.Cli.Package.targets = build\Microsoft.DotNet.Cli.Package.targets
|
||||
build\Microsoft.DotNet.Cli.Prepare.targets = build\Microsoft.DotNet.Cli.Prepare.targets
|
||||
build\Microsoft.DotNet.Cli.Publish.targets = build\Microsoft.DotNet.Cli.Publish.targets
|
||||
build\Microsoft.DotNet.Cli.Run.targets = build\Microsoft.DotNet.Cli.Run.targets
|
||||
build\Microsoft.DotNet.Cli.Signing.proj = build\Microsoft.DotNet.Cli.Signing.proj
|
||||
build\Microsoft.DotNet.Cli.Stage0.props = build\Microsoft.DotNet.Cli.Stage0.props
|
||||
build\Microsoft.DotNet.Cli.tasks = build\Microsoft.DotNet.Cli.tasks
|
||||
build\Microsoft.DotNet.Cli.Test.targets = build\Microsoft.DotNet.Cli.Test.targets
|
||||
build\Microsoft.DotNet.Cli.Version.props = build\Microsoft.DotNet.Cli.Version.props
|
||||
build\Microsoft.DotNet.Cli.VersionBadge.props = build\Microsoft.DotNet.Cli.VersionBadge.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{FD7D515A-D10F-4F49-B8AE-21CF7ED071AE}"
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0</Version>
|
||||
<!--Workaround for https://github.com/NuGet/Home/issues/4583-->
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<FrameworkRuntimeVersion>$(CLI_SharedFrameworkVersion)</FrameworkRuntimeVersion>
|
||||
<AssemblyName>dotnet-hello</AssemblyName>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>2.0.0</VersionPrefix>
|
||||
<Version>2.0.0</Version>
|
||||
<!--Workaround for https://github.com/NuGet/Home/issues/4583-->
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<FrameworkRuntimeVersion>$(CLI_SharedFrameworkVersion)</FrameworkRuntimeVersion>
|
||||
<AssemblyName>dotnet-hello</AssemblyName>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
||||
<add key="test-packages" value="../../../artifacts/testpackages/packages" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
||||
<add key="test-packages" value="../../../artifacts/testpackages/packages" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
10
build.proj
10
build.proj
|
@ -1,10 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="BuildTheWholeCli" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.InitRepo.props" />
|
||||
<Import Condition=" Exists('$(GitCommitInfoProps)') Or '$(GeneratingPropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
|
||||
<Import Condition=" Exists('$(HostInfoProps)') Or '$(GeneratingPropsFile)' != 'true' " Project="$(HostInfoProps)" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Monikers.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
|
@ -29,9 +25,6 @@
|
|||
<ExeExtension>.exe</ExeExtension>
|
||||
<ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension>
|
||||
|
||||
<Stage0Directory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</Stage0Directory>
|
||||
<Stage0PjDirectory>$(RepoRoot)/.dotnet_stage0PJ/$(Architecture)</Stage0PjDirectory>
|
||||
<DotnetStage0>$(Stage0Directory)/dotnet$(ExeExtension)</DotnetStage0>
|
||||
<DotnetCliBuildDirectory>$(RepoRoot)/build_projects/dotnet-cli-build</DotnetCliBuildDirectory>
|
||||
<PackagesDir>$(RepoRoot)/.nuget</PackagesDir>
|
||||
</PropertyGroup>
|
||||
|
@ -54,7 +47,7 @@
|
|||
DependsOnTargets="MSBuildWorkaroundTarget;
|
||||
RestoreDotnetCliBuildFramework">
|
||||
|
||||
<Exec Command="$(DotnetStage0) publish -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.0"
|
||||
<Exec Command="$(DotnetStage0) publish -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.0 /p:GeneratingPropsFile=true"
|
||||
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
</Target>
|
||||
|
||||
|
@ -69,6 +62,7 @@
|
|||
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)">
|
||||
|
||||
<PropertyGroup>
|
||||
<ExtraRestoreArgs Condition=" '$(GeneratingPropsFile)' == 'true' ">$(ExtraRestoreArgs) /p:GeneratingPropsFile=$(GeneratingPropsFile)</ExtraRestoreArgs>
|
||||
<ExtraRestoreArgs Condition="'$(OS)' != 'Windows_NT'">$(ExtraRestoreArgs) --disable-parallel</ExtraRestoreArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
6
build/Microsoft.DotNet.Cli.BranchInfo.props
Normal file
6
build/Microsoft.DotNet.Cli.BranchInfo.props
Normal file
|
@ -0,0 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<Channel>master</Channel>
|
||||
<BranchName>master</BranchName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
28
build/Microsoft.DotNet.Cli.Branding.props
Normal file
28
build/Microsoft.DotNet.Cli.Branding.props
Normal file
|
@ -0,0 +1,28 @@
|
|||
<Project ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SdkBrandName>Microsoft .NET Core 2.0.0 - SDK Alpha</SdkBrandName>
|
||||
<SharedFrameworkBrandName>Microsoft .NET Core 2.0.0 - Runtime</SharedFrameworkBrandName>
|
||||
<SharedHostBrandName>Microsoft .NET Core 2.0.0 - Host</SharedHostBrandName>
|
||||
<HostFxrBrandName>Microsoft .NET Core 2.0.0 - Host FX Resolver</HostFxrBrandName>
|
||||
|
||||
<AdditionalSharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</AdditionalSharedFrameworkBrandName>
|
||||
<AdditionalSharedHostBrandName>Microsoft .NET Core 1.0.1 - Host</AdditionalSharedHostBrandName>
|
||||
<AdditionalHostFxrBrandName>Microsoft .NET Core 1.0.1 - Host FX Resolver</AdditionalHostFxrBrandName>
|
||||
|
||||
<SharedFrameworkNugetName>Microsoft.NETCore.App</SharedFrameworkNugetName>
|
||||
|
||||
<ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' Or '$(Rid)' == 'fedora.23-x64' Or '$(Rid)' == 'opensuse.13.2-x64' ">$(Rid)</ProductMonikerRid>
|
||||
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
|
||||
|
||||
<ArtifactNameSdk>dotnet-sdk</ArtifactNameSdk>
|
||||
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-dev</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameCombinedFrameworkSdk>dotnet-sharedframework-sdk</ArtifactNameCombinedFrameworkSdk>
|
||||
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionSdkDebug>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameWithVersionCombinedFrameworkSdk>$(ArtifactNameCombinedFrameworkSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionCombinedFrameworkSdk>
|
||||
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<BundledSdk Include="NuGet.Build.Tasks.Pack" Version="$(CLI_NuGet_Version)" />
|
||||
<BundledSdk Include="Microsoft.NET.Sdk" Version="$(CLI_NETSDK_Version)" />
|
||||
|
|
23
build/Microsoft.DotNet.Cli.FileExtensions.props
Normal file
23
build/Microsoft.DotNet.Cli.FileExtensions.props
Normal file
|
@ -0,0 +1,23 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
|
||||
<ArchiveExtension Condition=" '$(OSName)' == 'win' ">.zip</ArchiveExtension>
|
||||
<ArchiveExtension Condition=" '$(OSName)' != 'win' ">.tar.gz</ArchiveExtension>
|
||||
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'win' ">.msi</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'osx' ">.pkg</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'ubuntu' ">.deb</InstallerExtension>
|
||||
|
||||
<BundleExtension Condition=" '$(OSName)' == 'win' ">.exe</BundleExtension>
|
||||
<BundleExtension Condition=" '$(OSName)' == 'osx' ">$(InstallerExtension)</BundleExtension>
|
||||
<BundleExtension Condition=" '$(OSName)' == 'ubuntu' ">$(InstallerExtension)</BundleExtension>
|
||||
|
||||
<DynamicLibPrefix>lib</DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
|
||||
|
||||
<DynamicLibExtension>.so</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibExtension>
|
||||
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<ShouldOverWriteThePropsFile
|
||||
Condition=" '$(DefaultCommitCount)' != '$(GitInfoCommitCount)' Or
|
||||
Condition=" '$(CommitCount)' != '$(GitInfoCommitCount)' Or
|
||||
'$(CommitHash)' != '$(GitInfoCommitHash)' ">true</ShouldOverWriteThePropsFile>
|
||||
|
||||
<GitCommitInfoPropsContent>
|
||||
<Project ToolsVersion="15.0">
|
||||
<PropertyGroup>
|
||||
<DefaultCommitCount>$(GitInfoCommitCount)</DefaultCommitCount>
|
||||
<CommitCount>$(GitInfoCommitCount)</CommitCount>
|
||||
<CommitHash>$(GitInfoCommitHash)</CommitHash>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SdkBrandName>Microsoft .NET Core 2.0.0 - SDK Alpha</SdkBrandName>
|
||||
<SharedFrameworkBrandName>Microsoft .NET Core 2.0.0 - Runtime</SharedFrameworkBrandName>
|
||||
<SharedHostBrandName>Microsoft .NET Core 2.0.0 - Host</SharedHostBrandName>
|
||||
<HostFxrBrandName>Microsoft .NET Core 2.0.0 - Host FX Resolver</HostFxrBrandName>
|
||||
|
||||
<AdditionalSharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</AdditionalSharedFrameworkBrandName>
|
||||
<AdditionalSharedHostBrandName>Microsoft .NET Core 1.0.1 - Host</AdditionalSharedHostBrandName>
|
||||
<AdditionalHostFxrBrandName>Microsoft .NET Core 1.0.1 - Host FX Resolver</AdditionalHostFxrBrandName>
|
||||
|
||||
<SharedFrameworkNugetName>Microsoft.NETCore.App</SharedFrameworkNugetName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
17
build/Microsoft.DotNet.Cli.OutputDirectories.props
Normal file
17
build/Microsoft.DotNet.Cli.OutputDirectories.props
Normal file
|
@ -0,0 +1,17 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<BaseOutputDirectory>$(RepoRoot)/artifacts/$(Rid)</BaseOutputDirectory>
|
||||
<ToolsOutputDirectory>$(BaseOutputDirectory)/tools</ToolsOutputDirectory>
|
||||
<Stage1Directory>$(BaseOutputDirectory)/stage1</Stage1Directory>
|
||||
<Stage1SymbolsDirectory>$(BaseOutputDirectory)/stage1symbols</Stage1SymbolsDirectory>
|
||||
<DotnetStage1>$(Stage1Directory)/dotnet$(ExeExtension)</DotnetStage1>
|
||||
<Stage2Directory>$(BaseOutputDirectory)/stage2</Stage2Directory>
|
||||
<Stage2SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</Stage2SymbolsDirectory>
|
||||
<DotnetStage2>$(Stage2Directory)/dotnet$(ExeExtension)</DotnetStage2>
|
||||
<OutputDirectory>$(Stage2Directory)/</OutputDirectory>
|
||||
<Stage2CompilationDirectory>$(BaseOutputDirectory)/stage2compilation</Stage2CompilationDirectory>
|
||||
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
||||
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
||||
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -16,77 +16,10 @@
|
|||
|
||||
<Target Name="InitializeCommonProps"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework" >
|
||||
<!-- Common Properties -->
|
||||
<PropertyGroup>
|
||||
<IsDesktopAvailable>False</IsDesktopAvailable>
|
||||
<IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
|
||||
<DotNetPath>$(Stage0Directory)</DotNetPath>
|
||||
<BaseOutputDirectory>$(RepoRoot)/artifacts/$(Rid)</BaseOutputDirectory>
|
||||
<ToolsOutputDirectory>$(BaseOutputDirectory)/tools</ToolsOutputDirectory>
|
||||
<Stage1Directory>$(BaseOutputDirectory)/stage1</Stage1Directory>
|
||||
<Stage1SymbolsDirectory>$(BaseOutputDirectory)/stage1symbols</Stage1SymbolsDirectory>
|
||||
<DotnetStage1>$(Stage1Directory)/dotnet$(ExeExtension)</DotnetStage1>
|
||||
<Stage2Directory>$(BaseOutputDirectory)/stage2</Stage2Directory>
|
||||
<Stage2SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</Stage2SymbolsDirectory>
|
||||
<DotnetStage2>$(Stage2Directory)/dotnet$(ExeExtension)</DotnetStage2>
|
||||
<OutputDirectory>$(Stage2Directory)/</OutputDirectory>
|
||||
<Stage2CompilationDirectory>$(BaseOutputDirectory)/stage2compilation</Stage2CompilationDirectory>
|
||||
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
||||
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
||||
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
||||
<CoreCLRRid>$(Rid)</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'win' ">win7-$(Architecture)</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'osx' ">osx.10.10-x64</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'centos' OR '$(OSName)' == 'rhel' ">rhel.7-x64</CoreCLRRid>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<CommitCount Condition=" '$(CommitCount)' == '' ">$(DefaultCommitCount)</CommitCount>
|
||||
|
||||
<SimpleVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>
|
||||
<VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
||||
<NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion>
|
||||
|
||||
<VersionBadgeMoniker>$(OSName)_$(Architecture)</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'ubuntu.16.04-x64' ">Ubuntu_16_04_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'fedora.23-x64' ">Fedora_23_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'opensuse.13.2-x64' ">openSUSE_13_2_x64</VersionBadgeMoniker>
|
||||
|
||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||
|
||||
<SdkNugetVersion>$(SdkVersion)</SdkNugetVersion>
|
||||
|
||||
<ArchiveExtension Condition=" '$(OSName)' == 'win' ">.zip</ArchiveExtension>
|
||||
<ArchiveExtension Condition=" '$(OSName)' != 'win' ">.tar.gz</ArchiveExtension>
|
||||
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'win' ">.msi</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'osx' ">.pkg</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(OSName)' == 'ubuntu' ">.deb</InstallerExtension>
|
||||
|
||||
<BundleExtension Condition=" '$(OSName)' == 'win' ">.exe</BundleExtension>
|
||||
<BundleExtension Condition=" '$(OSName)' == 'osx' ">$(InstallerExtension)</BundleExtension>
|
||||
<BundleExtension Condition=" '$(OSName)' == 'ubuntu' ">$(InstallerExtension)</BundleExtension>
|
||||
|
||||
<ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' Or '$(Rid)' == 'fedora.23-x64' Or '$(Rid)' == 'opensuse.13.2-x64' ">$(Rid)</ProductMonikerRid>
|
||||
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
|
||||
|
||||
<DynamicLibPrefix>lib</DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
|
||||
<DynamicLibExtension>.so</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibExtension>
|
||||
|
||||
<ArtifactNameSdk>dotnet-sdk</ArtifactNameSdk>
|
||||
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-dev</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameCombinedFrameworkSdk>dotnet-sharedframework-sdk</ArtifactNameCombinedFrameworkSdk>
|
||||
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionSdkDebug>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameWithVersionCombinedFrameworkSdk>$(ArtifactNameCombinedFrameworkSdk)-$(ProductMonikerRid).$(SdkVersion)</ArtifactNameWithVersionCombinedFrameworkSdk>
|
||||
|
||||
<!-- Downloaded Installers + Archives -->
|
||||
<DownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host-$(ProductMonikerRid).$(SharedHostVersion)$(InstallerExtension)</DownloadedSharedHostInstallerFileName>
|
||||
|
|
14
build/Microsoft.DotNet.Cli.Stage0.props
Normal file
14
build/Microsoft.DotNet.Cli.Stage0.props
Normal file
|
@ -0,0 +1,14 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<Stage0Directory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</Stage0Directory>
|
||||
<Stage0PjDirectory>$(RepoRoot)/.dotnet_stage0PJ/$(Architecture)</Stage0PjDirectory>
|
||||
<DotnetStage0>$(Stage0Directory)/dotnet$(ExeExtension)</DotnetStage0>
|
||||
<IsDesktopAvailable>False</IsDesktopAvailable>
|
||||
<IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
|
||||
<DotNetPath>$(Stage0Directory)</DotNetPath>
|
||||
<CoreCLRRid>$(Rid)</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'win' ">win7-$(Architecture)</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'osx' ">osx.10.10-x64</CoreCLRRid>
|
||||
<CoreCLRRid Condition=" '$(OSName)' == 'centos' OR '$(OSName)' == 'rhel' ">rhel.7-x64</CoreCLRRid>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -88,7 +88,7 @@
|
|||
Outputs="%(TestPackageProject.Identity)">
|
||||
|
||||
<DotNetRestore ToolPath="$(Stage2Directory)"
|
||||
ConfigFile="$(RepoRoot)\NuGet.Config"
|
||||
WorkingDirectory="$([System.IO.Directory]::GetParent('%(TestPackageProject.ProjectPath)'))"
|
||||
ProjectPath="%(TestPackageProject.ProjectPath)" />
|
||||
|
||||
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
||||
|
|
16
build/Microsoft.DotNet.Cli.Version.props
Normal file
16
build/Microsoft.DotNet.Cli.Version.props
Normal file
|
@ -0,0 +1,16 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<VersionPatch>0</VersionPatch>
|
||||
<ReleaseSuffix>alpha</ReleaseSuffix>
|
||||
|
||||
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||
<SimpleVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>
|
||||
<VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
||||
<NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion>
|
||||
|
||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||
<SdkNugetVersion>$(SdkVersion)</SdkNugetVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
10
build/Microsoft.DotNet.Cli.VersionBadge.props
Normal file
10
build/Microsoft.DotNet.Cli.VersionBadge.props
Normal file
|
@ -0,0 +1,10 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<VersionBadgeMoniker>$(OSName)_$(Architecture)</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'ubuntu.16.04-x64' ">Ubuntu_16_04_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'fedora.23-x64' ">Fedora_23_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'opensuse.13.2-x64' ">openSUSE_13_2_x64</VersionBadgeMoniker>
|
||||
|
||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||
</PropertyGroup>
|
||||
</Project>
|
26
dir.props
26
dir.props
|
@ -1,10 +1,24 @@
|
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="build/Microsoft.DotNet.Cli.DependencyVersions.props" />
|
||||
|
||||
<!-- NuGet Information -->
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="build/Microsoft.DotNet.Cli.InitRepo.props" />
|
||||
<Import Condition=" Exists('$(GitCommitInfoProps)') Or '$(GeneratingPropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
|
||||
<Import Condition=" Exists('$(HostInfoProps)') Or '$(GeneratingPropsFile)' != 'true' " Project="$(HostInfoProps)" />
|
||||
|
||||
<Import Project="build/Microsoft.DotNet.Cli.BranchInfo.props" />
|
||||
|
||||
<Import Project="build/Microsoft.DotNet.Cli.DependencyVersions.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.FileExtensions.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.OutputDirectories.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Stage0.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Version.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.Branding.props" />
|
||||
<Import Project="build/Microsoft.DotNet.Cli.VersionBadge.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
|
||||
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
||||
|
||||
|
@ -12,14 +26,6 @@
|
|||
|
||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<VersionPatch>0</VersionPatch>
|
||||
<ReleaseSuffix>alpha</ReleaseSuffix>
|
||||
<Channel>master</Channel>
|
||||
<BranchName>master</BranchName>
|
||||
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||
|
||||
<CliTargetFramework>netcoreapp2.0</CliTargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace Microsoft.DotNet.TestFramework
|
|||
public TestAssetInstance WithNuGetConfig(string nugetCache)
|
||||
{
|
||||
var thisAssembly = typeof(TestAssetInstance).GetTypeInfo().Assembly;
|
||||
var newNuGetConfig = Root.GetFile("Nuget.config");
|
||||
var newNuGetConfig = Root.GetFile("NuGet.Config");
|
||||
|
||||
var content = @"<?xml version=""1.0"" encoding=""utf-8""?>
|
||||
<configuration>
|
||||
|
|
|
@ -65,19 +65,19 @@ namespace Microsoft.DotNet.Tests
|
|||
var testInstance = TestAssets.Get(appName)
|
||||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages);
|
||||
|
||||
if (useCurrentFrameworkRuntimeVersion)
|
||||
{
|
||||
testInstance = testInstance.UseCurrentRuntimeFrameworkVersion();
|
||||
|
||||
// restore again now that the project has changed
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
// restore again now that the project has changed
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
new BuildCommand()
|
||||
.WithProjectDirectory(testInstance.Root)
|
||||
.Execute()
|
||||
|
@ -273,8 +273,8 @@ namespace Microsoft.DotNet.Tests
|
|||
var testInstance = TestAssets.Get("AppWithDirectDep")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles()
|
||||
.UseCurrentRuntimeFrameworkVersion();
|
||||
.UseCurrentRuntimeFrameworkVersion()
|
||||
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages);
|
||||
|
||||
// restore again now that the project has changed
|
||||
new RestoreCommand()
|
||||
|
|
Loading…
Reference in a new issue