зеркало из https://github.com/dotnet/aspnetcore.git
Fix 2.1 build issues and remove obsolete build code (#4443)
- Stop producing the 'Universe' lineup package - Removes all PackageLineup code - Use full msbuild on Windows - Fix invalid reference to internal.aspnetcore.sdk in 2.1.x - Fix shared folder references for PackageArchive task.
This commit is contained in:
Родитель
49a45e7eca
Коммит
0588b13f5b
|
@ -8,7 +8,7 @@
|
|||
<ArchiveProjects Include="$(RepositoryRoot)src\PackageArchive\Archive.*\*.*proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildFallbackArchive" DependsOnTargets="GetProjectArtifactInfo;ResolveRepoInfo;GeneratePropsFiles">
|
||||
<Target Name="BuildFallbackArchive" DependsOnTargets="ResolveSharedSourcesPackageInfo;GetProjectArtifactInfo;ResolveRepoInfo;GeneratePropsFiles">
|
||||
<PropertyGroup>
|
||||
<ArchiveBuildProps>
|
||||
DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);
|
||||
|
|
|
@ -83,7 +83,8 @@
|
|||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:BuildNumber=$(BuildNumber)</RepositoryBuildArguments>
|
||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:Configuration=$(Configuration)</RepositoryBuildArguments>
|
||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:IsFinalBuild=$(IsFinalBuild)</RepositoryBuildArguments>
|
||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /noconsolelogger '/l:RepoTasks.FlowLogger,$(MSBuildThisFileDirectory)tasks\bin\publish\RepoTasks.dll;Summary;FlowId=$(RepositoryToBuild)'</RepositoryBuildArguments>
|
||||
<!-- We collect all output and code sign at the end. We don't need to code sign when we build each submodule. -->
|
||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:DisableCodeSigning=true</RepositoryBuildArguments>
|
||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) '/p:DotNetAssetRootAccessTokenSuffix=$(DotNetAssetRootAccessTokenSuffix)'</RepositoryBuildArguments>
|
||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) '/p:DotNetAssetRootUrl=$(DotNetAssetRootUrl)'</RepositoryBuildArguments>
|
||||
<RepositoryBuildArguments Condition=" '$(SkipTestsDueToMissingSharedFx)' == 'true' ">$(RepositoryBuildArguments) /p:SkipAspNetCoreRuntimeInstall=true</RepositoryBuildArguments>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<PackageArtifact Include="dotnet-sql-cache" Category="ship" />
|
||||
<PackageArtifact Include="dotnet-user-secrets" Category="ship" />
|
||||
<PackageArtifact Include="dotnet-watch" Category="ship" />
|
||||
<PackageArtifact Include="Internal.AspNetCore.Universe.Lineup" Category="noship" PackageType="Lineup" />
|
||||
<PackageArtifact Include="Microsoft.AspNet.Identity.AspNetCoreCompat" Category="noship" />
|
||||
<PackageArtifact Include="Microsoft.AspNetCore.All" Category="ship" />
|
||||
<PackageArtifact Include="Microsoft.AspNetCore.Analyzers" Category="shipoob" />
|
||||
|
|
|
@ -10,93 +10,80 @@
|
|||
<!-- When true, this dependency will be included in the Microsoft.AspNetCore.All metapackage. -->
|
||||
<AllMetapackage>false</AllMetapackage>
|
||||
</ExternalDependency>
|
||||
|
||||
<!-- For dependencies from aspnet/Extensions -->
|
||||
<ExtensionsDependency>
|
||||
<!-- The NuGet package version. Floating versions not allowed. -->
|
||||
<Version></Version>
|
||||
<!-- When true, this dependency will be included in the Microsoft.AspNetCore.App metapackage. -->
|
||||
<AppMetapackage>false</AppMetapackage>
|
||||
<!-- When true, this dependency will be included in the Microsoft.AspNetCore.All metapackage. -->
|
||||
<AllMetapackage>false</AllMetapackage>
|
||||
<IsExtensionsPackage>true</IsExtensionsPackage>
|
||||
</ExtensionsDependency>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Packages from aspnet/Extensions -->
|
||||
<ExtensionsDependency Include="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="$(MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.AspNetCore.Certificates.Generation.Sources" Version="$(MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.ActivatorUtilities.Sources" Version="$(MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Caching.Abstractions" Version="$(MicrosoftExtensionsCachingAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Caching.Redis" Version="$(MicrosoftExtensionsCachingRedisPackageVersion)" AllMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Caching.SqlServer" Version="$(MicrosoftExtensionsCachingSqlServerPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.ClosedGenericMatcher.Sources" Version="$(MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsConfigurationAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="$(MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion)" AllMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.Binder" Version="$(MicrosoftExtensionsConfigurationBinderPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(MicrosoftExtensionsConfigurationCommandLinePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.FileExtensions" Version="$(MicrosoftExtensionsConfigurationFileExtensionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.Ini" Version="$(MicrosoftExtensionsConfigurationIniPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.KeyPerFile" Version="$(MicrosoftExtensionsConfigurationKeyPerFilePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.UserSecrets" Version="$(MicrosoftExtensionsConfigurationUserSecretsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration.Xml" Version="$(MicrosoftExtensionsConfigurationXmlPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Configuration" Version="$(MicrosoftExtensionsConfigurationPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.CopyOnWriteDictionary.Sources" Version="$(MicrosoftExtensionsCopyOnWriteDictionarySourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.DependencyInjection.Specification.Tests" Version="$(MicrosoftExtensionsDependencyInjectionSpecificationTestsPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.DiagnosticAdapter" Version="$(MicrosoftExtensionsDiagnosticAdapterPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.FileProviders.Abstractions" Version="$(MicrosoftExtensionsFileProvidersAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.FileProviders.Composite" Version="$(MicrosoftExtensionsFileProvidersCompositePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.FileProviders.Physical" Version="$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.HashCodeCombiner.Sources" Version="$(MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(MicrosoftExtensionsHostingAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Localization.Abstractions" Version="$(MicrosoftExtensionsLocalizationAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Localization" Version="$(MicrosoftExtensionsLocalizationPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsHostingPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsHttpPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.AzureAppServices" Version="$(MicrosoftExtensionsLoggingAzureAppServicesPackageVersion)" AllMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.Configuration" Version="$(MicrosoftExtensionsLoggingConfigurationPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.Debug" Version="$(MicrosoftExtensionsLoggingDebugPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.EventLog" Version="$(MicrosoftExtensionsLoggingEventLogPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.EventSource" Version="$(MicrosoftExtensionsLoggingEventSourcePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.Testing" Version="$(MicrosoftExtensionsLoggingTestingPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging.TraceSource" Version="$(MicrosoftExtensionsLoggingTraceSourcePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.ObjectMethodExecutor.Sources" Version="$(MicrosoftExtensionsObjectMethodExecutorSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.ObjectPool" Version="$(MicrosoftExtensionsObjectPoolPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="$(MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Primitives" Version="$(MicrosoftExtensionsPrimitivesPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.Process.Sources" Version="$(MicrosoftExtensionsProcessSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.PropertyActivator.Sources" Version="$(MicrosoftExtensionsPropertyActivatorSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.PropertyHelper.Sources" Version="$(MicrosoftExtensionsPropertyHelperSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.RazorViews.Sources" Version="$(MicrosoftExtensionsRazorViewsSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.SecurityHelper.Sources" Version="$(MicrosoftExtensionsSecurityHelperSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.StackTrace.Sources" Version="$(MicrosoftExtensionsStackTraceSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.TypeNameHelper.Sources" Version="$(MicrosoftExtensionsTypeNameHelperSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.ValueStopwatch.Sources" Version="$(MicrosoftExtensionsValueStopwatchSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.WebEncoders.Sources" Version="$(MicrosoftExtensionsWebEncodersSourcesPackageVersion)" />
|
||||
<ExtensionsDependency Include="Microsoft.Extensions.WebEncoders" Version="$(MicrosoftExtensionsWebEncodersPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="$(MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.AspNetCore.Certificates.Generation.Sources" Version="$(MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.ActivatorUtilities.Sources" Version="$(MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Caching.Abstractions" Version="$(MicrosoftExtensionsCachingAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Caching.Redis" Version="$(MicrosoftExtensionsCachingRedisPackageVersion)" AllMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Caching.SqlServer" Version="$(MicrosoftExtensionsCachingSqlServerPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.ClosedGenericMatcher.Sources" Version="$(MicrosoftExtensionsClosedGenericMatcherSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsConfigurationAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="$(MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion)" AllMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.Binder" Version="$(MicrosoftExtensionsConfigurationBinderPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(MicrosoftExtensionsConfigurationCommandLinePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.FileExtensions" Version="$(MicrosoftExtensionsConfigurationFileExtensionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.Ini" Version="$(MicrosoftExtensionsConfigurationIniPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.KeyPerFile" Version="$(MicrosoftExtensionsConfigurationKeyPerFilePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.UserSecrets" Version="$(MicrosoftExtensionsConfigurationUserSecretsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration.Xml" Version="$(MicrosoftExtensionsConfigurationXmlPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Configuration" Version="$(MicrosoftExtensionsConfigurationPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.CopyOnWriteDictionary.Sources" Version="$(MicrosoftExtensionsCopyOnWriteDictionarySourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.DependencyInjection.Specification.Tests" Version="$(MicrosoftExtensionsDependencyInjectionSpecificationTestsPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.DiagnosticAdapter" Version="$(MicrosoftExtensionsDiagnosticAdapterPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.FileProviders.Abstractions" Version="$(MicrosoftExtensionsFileProvidersAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.FileProviders.Composite" Version="$(MicrosoftExtensionsFileProvidersCompositePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.FileProviders.Physical" Version="$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.HashCodeCombiner.Sources" Version="$(MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(MicrosoftExtensionsHostingAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Localization.Abstractions" Version="$(MicrosoftExtensionsLocalizationAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Localization" Version="$(MicrosoftExtensionsLocalizationPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsHostingPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsHttpPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.AzureAppServices" Version="$(MicrosoftExtensionsLoggingAzureAppServicesPackageVersion)" AllMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.Configuration" Version="$(MicrosoftExtensionsLoggingConfigurationPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.Debug" Version="$(MicrosoftExtensionsLoggingDebugPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.EventLog" Version="$(MicrosoftExtensionsLoggingEventLogPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.EventSource" Version="$(MicrosoftExtensionsLoggingEventSourcePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.Testing" Version="$(MicrosoftExtensionsLoggingTestingPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging.TraceSource" Version="$(MicrosoftExtensionsLoggingTraceSourcePackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.ObjectMethodExecutor.Sources" Version="$(MicrosoftExtensionsObjectMethodExecutorSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.ObjectPool" Version="$(MicrosoftExtensionsObjectPoolPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="$(MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Primitives" Version="$(MicrosoftExtensionsPrimitivesPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.Process.Sources" Version="$(MicrosoftExtensionsProcessSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.PropertyActivator.Sources" Version="$(MicrosoftExtensionsPropertyActivatorSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.PropertyHelper.Sources" Version="$(MicrosoftExtensionsPropertyHelperSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.RazorViews.Sources" Version="$(MicrosoftExtensionsRazorViewsSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.SecurityHelper.Sources" Version="$(MicrosoftExtensionsSecurityHelperSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.StackTrace.Sources" Version="$(MicrosoftExtensionsStackTraceSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.TypeNameHelper.Sources" Version="$(MicrosoftExtensionsTypeNameHelperSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.ValueStopwatch.Sources" Version="$(MicrosoftExtensionsValueStopwatchSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.WebEncoders.Sources" Version="$(MicrosoftExtensionsWebEncodersSourcesPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.Extensions.WebEncoders" Version="$(MicrosoftExtensionsWebEncodersPackageVersion)" AllMetapackage="true" AppMetapackage="true" />
|
||||
|
||||
<!-- These dependencies are temporary while we refactor package refs into project refs. -->
|
||||
<ExtensionsDependency Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
|
||||
<ExternalDependency Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ExternalDependency Include="@(ExtensionsDependency)" />
|
||||
|
||||
<ExternalDependency Include="AngleSharp" Version="$(AngleSharpPackageVersion)" />
|
||||
<ExternalDependency Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPackageVersion)" />
|
||||
<ExternalDependency Include="Castle.Core" Version="$(CastleCorePackageVersion)" />
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Internal.AspNetCore.Universe.Lineup</id>
|
||||
<version>$version$</version>
|
||||
<authors>Microsoft</authors>
|
||||
<description>This package used to unify ASP.NET Core package versions across all ASP.NET Core repos. Internal use only.</description>
|
||||
<packageTypes>
|
||||
<packageType name="lineup" />
|
||||
</packageTypes>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="$dependenciesPropsFile$" target="build/dependencies.props" />
|
||||
<file src="$brandingPropsFile$" target="build/branding.props" />
|
||||
</files>
|
||||
</package>
|
|
@ -1,10 +0,0 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
This ensures the build number is a time-based number for local builds.
|
||||
This is important for local builds of ASP.NET Core which need to ensure repo-to-repo
|
||||
builds are using new articacts, not ones from the global cache.
|
||||
-->
|
||||
<IncrementalVersion>true</IncrementalVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -54,7 +54,7 @@
|
|||
<!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. -->
|
||||
<ProjectToExclude Include="
|
||||
$(RepositoryRoot)src\Middleware\WebSockets\samples\**\*.csproj;
|
||||
$(RepositoryRoot)src\Tools\dotnet-watch\test\TestProjects\**\*.csproj;
|
||||
$(RepositoryRoot)src\Tools\dotnet-watch\test\TestProjects\**\*.csproj
|
||||
" />
|
||||
|
||||
<ProjectToBuild Include="
|
||||
|
@ -67,7 +67,11 @@
|
|||
$(RepositoryRoot)src\Tools\**\*.*proj;
|
||||
$(RepositoryRoot)src\Middleware\**\*.*proj;
|
||||
"
|
||||
Exclude="@(ProjectToExclude)" />
|
||||
Exclude="
|
||||
@(ProjectToExclude);
|
||||
$(RepositoryRoot)**\bin\**\*;
|
||||
$(RepositoryRoot)**\obj\**\*;
|
||||
$(RepositoryRoot)**\AutobahnTestApp\**\*;" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Properties for publishing -->
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
<Import Project="SharedFx.targets" />
|
||||
<Import Project="SharedFxInstaller.targets" />
|
||||
<Import Project="Publish.targets" />
|
||||
|
||||
<!-- Workaround for #1014 -->
|
||||
<Import Project="buildorder.props" Condition="$([MSBuild]::IsOSUnixLike())" />
|
||||
<Import Project="buildorder.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<GeneratedPackageVersionPropsPath>$(IntermediateDir)dependencies.g.props</GeneratedPackageVersionPropsPath>
|
||||
|
@ -67,7 +65,7 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ResolveRepoInfo" DependsOnTargets="_ResolveProjectArtifactsInfoShipped;_PrepareRepositories;GetMetapackageArtifactInfo;GetLineupPackageInfo">
|
||||
<Target Name="ResolveRepoInfo" DependsOnTargets="_ResolveProjectArtifactsInfoShipped;_PrepareRepositories;GetMetapackageArtifactInfo">
|
||||
<!-- We need to pass the NETCoreApp package versions to msbuild so that it doesn't complain about us using a different one than it was restored against. -->
|
||||
<PropertyGroup>
|
||||
<DesignTimeBuildProps>MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreAppPackageVersion);</DesignTimeBuildProps>
|
||||
|
@ -154,18 +152,6 @@
|
|||
<Error Text="No solutions were found in '$(SubmoduleRoot)'. Did you forget to clone the submodules? Run `git submodule update --init`." Condition="@(Solution->Count()) == 0" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GetLineupPackageInfo">
|
||||
<ItemGroup>
|
||||
<ArtifactInfo Include="$(BuildDir)Internal.AspNetCore.Universe.Lineup.$(PackageVersion).nupkg">
|
||||
<ArtifactType>NuGetPackage</ArtifactType>
|
||||
<PackageId>Internal.AspNetCore.Universe.Lineup</PackageId>
|
||||
<Version>$(PackageVersion)</Version>
|
||||
<Category>noship</Category>
|
||||
<IsLineup>true</IsLineup>
|
||||
</ArtifactInfo>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GeneratePropsFiles" DependsOnTargets="PrepareOutputPaths;GetArtifactInfo">
|
||||
<ItemGroup>
|
||||
<_LineupPackages Include="@(ExternalDependency)" />
|
||||
|
@ -209,13 +195,6 @@
|
|||
<WriteLinesToFile File="$(GeneratedBrandingPropsPath)" Overwrite="true" Lines="$(BrandingPropsContent)"/>
|
||||
|
||||
<Copy SourceFiles="$(GeneratedPackageVersionPropsPath);$(GeneratedBrandingPropsPath)" DestinationFolder="$(ArtifactsDir)" />
|
||||
|
||||
<PackNuSpec NuSpecPath="$(MSBuildThisFileDirectory)lineups\Internal.AspNetCore.Universe.Lineup.nuspec"
|
||||
DestinationFolder="$(BuildDir)"
|
||||
Overwrite="true"
|
||||
Properties="version=$(PackageVersion);dependenciesPropsFile=$(GeneratedPackageVersionPropsPath);brandingPropsFile=$(GeneratedBrandingPropsPath)">
|
||||
<Output TaskParameter="Packages" ItemName="LineupPackage" />
|
||||
</PackNuSpec>
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanRepoArtifacts">
|
||||
|
@ -223,26 +202,6 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="_PrepareRepositories">
|
||||
<ItemGroup Condition="'$(KOREBUILD_REPOSITORY_INCLUDE)'!=''">
|
||||
<_RepositoriesToInclude Include="$(KOREBUILD_REPOSITORY_INCLUDE)" />
|
||||
<Repository Update="@(Repository)" Build="false" />
|
||||
<Repository
|
||||
Update="@(Repository)"
|
||||
Condition="'@(Repository)'=='@(_RepositoriesToInclude)' AND '%(Identity)'!=''"
|
||||
Build="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(KOREBUILD_REPOSITORY_EXCLUDE)'!=''">
|
||||
<_RepositoriesToExclude Include="$(KOREBUILD_REPOSITORY_EXCLUDE)" />
|
||||
<Repository
|
||||
Update="@(Repository)"
|
||||
Condition="'@(Repository)'=='@(_RepositoriesToExclude)' AND '%(Identity)'!=''"
|
||||
Build="false" />
|
||||
</ItemGroup>
|
||||
|
||||
<Error Text="KOREBUILD_REPOSITORY_EXCLUDE AND KOREBUILD_REPOSITORY_INCLUDE are specified."
|
||||
Condition="'$(KOREBUILD_REPOSITORY_INCLUDE)' != '' AND '$(KOREBUILD_REPOSITORY_EXCLUDE)' != ''" />
|
||||
|
||||
<ItemGroup>
|
||||
<Repository Update="%(Identity)" RootPath="$(SubmoduleRoot)%(Identity)\" Condition="'%(Identity)' != '' AND '%(RootPath)' == ''" />
|
||||
<ShippedRepository Update="%(Identity)" RootPath="$(SubmoduleRoot)%(Identity)\" Condition="'%(Identity)' != '' AND '%(RootPath)' == ''" />
|
||||
|
@ -252,36 +211,20 @@
|
|||
<Target Name="BuildRepositories"
|
||||
DependsOnTargets="_PrepareRepositories;GeneratePropsFiles;ComputeGraph;_BuildRepositories" />
|
||||
|
||||
<Target Name="ListExpectedPackages" DependsOnTargets="GetProjectArtifactInfo;ResolveRepoInfo">
|
||||
<Target Name="ListExpectedPackages" DependsOnTargets="ResolveSharedSourcesPackageInfo;GetProjectArtifactInfo;ResolveRepoInfo">
|
||||
<WriteLinesToFile File="$(RepositoryRoot)artifacts\packages.csv" Lines="PackageId,Version;@(ArtifactInfo->WithMetadataValue('ArtifactType', 'NuGetPackage')->'%(PackageId),%(Version)')" Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ComputeGraph" DependsOnTargets="ResolveSharedSourcesPackageInfo;GetProjectArtifactInfo;ResolveRepoInfo;GeneratePropsFiles">
|
||||
<RepoTasks.CheckRepoGraph Condition=" ! $([MSBuild]::IsOSUnixLike())"
|
||||
Solutions="@(Solution)"
|
||||
Artifacts="@(ArtifactInfo);@(ShippedArtifactInfo)"
|
||||
Repositories="@(Repository);@(ShippedRepository)"
|
||||
Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);InternalAspNetCoreSdkPackageVersion=$(InternalAspNetCoreSdkPackageVersion)" />
|
||||
|
||||
<ItemGroup>
|
||||
<_UndeclaredPackageArtifact Include="%(ArtifactInfo.PackageId)" Condition="'%(ArtifactInfo.ArtifactType)' == 'NuGetPackage'" />
|
||||
<_UndeclaredPackageArtifact Remove="@(PackageArtifact)" />
|
||||
<RepositoryBuildOrder Remove="@(ShippedRepository)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Error Text="Undeclared package artifacts. Add these to artifacts.props:%0A - @(_UndeclaredPackageArtifact, '%0A - ')"
|
||||
Condition=" @(_UndeclaredPackageArtifact->Count()) != 0 " />
|
||||
|
||||
<!-- Skipped to workaround #1014. The order is hardcoded in buildorder.props -->
|
||||
<RepoTasks.AnalyzeBuildGraph Condition=" ! $([MSBuild]::IsOSUnixLike())"
|
||||
Solutions="@(Solution)"
|
||||
Artifacts="@(ArtifactInfo);@(ShippedArtifactInfo)"
|
||||
Repositories="@(Repository);@(ShippedRepository)"
|
||||
Dependencies="@(ExternalDependency)"
|
||||
StartGraphAt="$(BuildGraphOf)"
|
||||
Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);InternalAspNetCoreSdkPackageVersion=$(InternalAspNetCoreSdkPackageVersion)">
|
||||
<Output TaskParameter="RepositoryBuildOrder" ItemName="RepositoryBuildOrder" />
|
||||
</RepoTasks.AnalyzeBuildGraph>
|
||||
|
||||
<Message Text="Repository build order:" Importance="high" />
|
||||
<Message Text="%(RepositoryBuildOrder.Order). @(RepositoryBuildOrder, ', ')" Importance="high" />
|
||||
</Target>
|
||||
|
|
|
@ -1,299 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NuGet.Frameworks;
|
||||
using NuGet.Versioning;
|
||||
using RepoTools.BuildGraph;
|
||||
using RepoTasks.ProjectModel;
|
||||
using RepoTasks.Utilities;
|
||||
|
||||
namespace RepoTasks
|
||||
{
|
||||
public class AnalyzeBuildGraph : Task, ICancelableTask
|
||||
{
|
||||
private readonly CancellationTokenSource _cts = new CancellationTokenSource();
|
||||
|
||||
/// <summary>
|
||||
/// Repositories that we are building new versions of.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public ITaskItem[] Solutions { get; set; }
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] Artifacts { get; set; }
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] Repositories { get; set; }
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] Dependencies { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Properties { get; set; }
|
||||
|
||||
public string StartGraphAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The order in which to build repositories
|
||||
/// </summary>
|
||||
[Output]
|
||||
public ITaskItem[] RepositoryBuildOrder { get; set; }
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
_cts.Cancel();
|
||||
}
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
var packageArtifacts = Artifacts.Select(ArtifactInfo.Parse)
|
||||
.OfType<ArtifactInfo.Package>()
|
||||
.Where(p => !p.IsSymbolsArtifact);
|
||||
|
||||
var factory = new SolutionInfoFactory(Log, BuildEngine5);
|
||||
var props = MSBuildListSplitter.GetNamedProperties(Properties);
|
||||
|
||||
Log.LogMessage(MessageImportance.High, $"Beginning cross-repo analysis on {Solutions.Length} solutions. Hang tight...");
|
||||
|
||||
if (!props.TryGetValue("Configuration", out var defaultConfig))
|
||||
{
|
||||
defaultConfig = "Debug";
|
||||
}
|
||||
|
||||
var solutions = factory.Create(Solutions, props, defaultConfig, _cts.Token);
|
||||
Log.LogMessage($"Found {solutions.Count} and {solutions.Sum(p => p.Projects.Count)} projects");
|
||||
|
||||
var policies = new Dictionary<string, PatchPolicy>();
|
||||
foreach (var repo in Repositories)
|
||||
{
|
||||
policies.Add(repo.ItemSpec, Enum.Parse<PatchPolicy>(repo.GetMetadata("PatchPolicy")));
|
||||
}
|
||||
|
||||
foreach (var solution in solutions)
|
||||
{
|
||||
var repoName = Path.GetFileName(solution.Directory);
|
||||
solution.PatchPolicy = policies[repoName];
|
||||
}
|
||||
|
||||
if (_cts.IsCancellationRequested)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
EnsureConsistentGraph(packageArtifacts, solutions);
|
||||
RepositoryBuildOrder = GetRepositoryBuildOrder(packageArtifacts, solutions.Where(s => s.ShouldBuild));
|
||||
|
||||
return !Log.HasLoggedErrors;
|
||||
}
|
||||
|
||||
private struct VersionMismatch
|
||||
{
|
||||
public SolutionInfo Solution;
|
||||
public ProjectInfo Project;
|
||||
public string PackageId;
|
||||
public string ActualVersion;
|
||||
public NuGetVersion ExpectedVersion;
|
||||
}
|
||||
|
||||
private void EnsureConsistentGraph(IEnumerable<ArtifactInfo.Package> packages, IEnumerable<SolutionInfo> solutions)
|
||||
{
|
||||
// ensure versions cascade
|
||||
var buildPackageMap = packages.ToDictionary(p => p.PackageInfo.Id, p => p, StringComparer.OrdinalIgnoreCase);
|
||||
var dependencyMap = new Dictionary<string, List<ExternalDependency>>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var dep in Dependencies)
|
||||
{
|
||||
if (dep.GetMetadata("IsExtensionsPackage") == "true")
|
||||
{
|
||||
buildPackageMap.Add(dep.ItemSpec, new ArtifactInfo.Package
|
||||
{
|
||||
PackageInfo = new PackageInfo(dep.ItemSpec, new NuGetVersion(dep.GetMetadata("Version")), null, null),
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!dependencyMap.TryGetValue(dep.ItemSpec, out var versions))
|
||||
{
|
||||
dependencyMap[dep.ItemSpec] = versions = new List<ExternalDependency>();
|
||||
}
|
||||
|
||||
versions.Add(new ExternalDependency
|
||||
{
|
||||
PackageId = dep.ItemSpec,
|
||||
Version = dep.GetMetadata("Version"),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var inconsistentVersions = new List<VersionMismatch>();
|
||||
|
||||
foreach (var solution in solutions)
|
||||
foreach (var project in solution.Projects)
|
||||
foreach (var tfm in project.Frameworks)
|
||||
foreach (var dependency in tfm.Dependencies)
|
||||
{
|
||||
if (!buildPackageMap.TryGetValue(dependency.Key, out var package))
|
||||
{
|
||||
var idx = -1;
|
||||
// This dependency is not one of the packages that will be compiled by this run of Universe.
|
||||
if (!dependencyMap.TryGetValue(dependency.Key, out var externalVersions)
|
||||
|| (idx = externalVersions.FindIndex(0, externalVersions.Count, i => i.Version == dependency.Value.Version)) < 0)
|
||||
{
|
||||
Log.LogKoreBuildError(
|
||||
project.FullPath,
|
||||
KoreBuildErrors.UndefinedExternalDependency,
|
||||
message: $"Undefined external dependency on {dependency.Key}/{dependency.Value.Version}");
|
||||
}
|
||||
|
||||
if (idx >= 0)
|
||||
{
|
||||
externalVersions[idx].IsReferenced = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
var refVersion = VersionRange.Parse(dependency.Value.Version);
|
||||
if (refVersion.IsFloating && refVersion.Float.Satisfies(package.PackageInfo.Version))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (package.PackageInfo.Version.Equals(refVersion.MinVersion))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var shouldCascade = (solution.PatchPolicy & PatchPolicy.CascadeVersions) != 0;
|
||||
if (!solution.ShouldBuild && !solution.IsPatching && shouldCascade)
|
||||
{
|
||||
var repoName = Path.GetFileName(Path.GetDirectoryName(solution.FullPath));
|
||||
Log.LogError($"{repoName} should not be marked 'IsPatching=false'. Version changes in other repositories mean it should be patched to perserve cascading version upgrades.");
|
||||
|
||||
}
|
||||
|
||||
if (shouldCascade)
|
||||
{
|
||||
inconsistentVersions.Add(new VersionMismatch
|
||||
{
|
||||
Solution = solution,
|
||||
Project = project,
|
||||
PackageId = dependency.Key,
|
||||
ActualVersion = dependency.Value.Version,
|
||||
ExpectedVersion = package.PackageInfo.Version,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (inconsistentVersions.Count != 0)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($"Repos are inconsistent. The following projects have PackageReferences that should be updated");
|
||||
foreach (var solution in inconsistentVersions.GroupBy(p => p.Solution.FullPath))
|
||||
{
|
||||
sb.Append(" - ").AppendLine(Path.GetFileName(solution.Key));
|
||||
foreach (var project in solution.GroupBy(p => p.Project.FullPath))
|
||||
{
|
||||
sb.Append(" - ").AppendLine(Path.GetFileName(project.Key));
|
||||
foreach (var mismatchedReference in project)
|
||||
{
|
||||
sb.AppendLine($" + {mismatchedReference.PackageId}/{{{mismatchedReference.ActualVersion} => {mismatchedReference.ExpectedVersion}}}");
|
||||
}
|
||||
}
|
||||
}
|
||||
sb.AppendLine();
|
||||
Log.LogMessage(MessageImportance.High, sb.ToString());
|
||||
Log.LogError("Package versions are inconsistent. See build log for details.");
|
||||
}
|
||||
|
||||
foreach (var versions in dependencyMap.Values)
|
||||
{
|
||||
foreach (var item in versions.Where(i => !i.IsReferenced))
|
||||
{
|
||||
// See https://github.com/aspnet/Universe/wiki/Build-warning-and-error-codes#potentially-unused-external-dependency for details
|
||||
Log.LogMessage(MessageImportance.Normal, $"Potentially unused external dependency: {item.PackageId}/{item.Version}. See https://github.com/aspnet/Universe/wiki/Build-warning-and-error-codes for details.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ITaskItem[] GetRepositoryBuildOrder(IEnumerable<ArtifactInfo.Package> artifacts, IEnumerable<SolutionInfo> solutions)
|
||||
{
|
||||
var repositories = solutions.Select(s =>
|
||||
{
|
||||
var repoName = Path.GetFileName(Path.GetDirectoryName(s.FullPath));
|
||||
var repo = new Repository(repoName)
|
||||
{
|
||||
RootDir = Path.GetDirectoryName(s.FullPath)
|
||||
};
|
||||
|
||||
var packages = artifacts
|
||||
.Where(a => string.Equals(a.RepoName, repoName, StringComparison.OrdinalIgnoreCase))
|
||||
.ToDictionary(p => p.PackageInfo.Id, p => p, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
foreach (var proj in s.Projects)
|
||||
{
|
||||
IList<Project> projectGroup;
|
||||
if (packages.ContainsKey(proj.PackageId))
|
||||
{
|
||||
// this project is a package producer and consumer
|
||||
packages.Remove(proj.PackageId);
|
||||
projectGroup = repo.Projects;
|
||||
}
|
||||
else
|
||||
{
|
||||
// this project is a package consumer
|
||||
projectGroup = repo.SupportProjects;
|
||||
}
|
||||
|
||||
|
||||
projectGroup.Add(new Project(proj.PackageId)
|
||||
{
|
||||
Repository = repo,
|
||||
PackageReferences = new HashSet<string>(proj
|
||||
.Frameworks
|
||||
.SelectMany(f => f.Dependencies.Keys)
|
||||
.Concat(proj.Tools.Select(t => t.Id)), StringComparer.OrdinalIgnoreCase),
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var packageId in packages.Keys)
|
||||
{
|
||||
// these packages are produced from something besides a csproj. e.g. .Sources packages
|
||||
repo.Projects.Add(new Project(packageId) { Repository = repo });
|
||||
}
|
||||
|
||||
return repo;
|
||||
}).ToList();
|
||||
|
||||
var graph = GraphBuilder.Generate(repositories, StartGraphAt, Log);
|
||||
var repositoriesWithOrder = new List<(ITaskItem repository, int order)>();
|
||||
foreach (var repository in repositories)
|
||||
{
|
||||
var graphNodeRepository = graph.FirstOrDefault(g => g.Repository.Name == repository.Name);
|
||||
if (graphNodeRepository == null)
|
||||
{
|
||||
// StartGraphAt was specified so the graph is incomplete.
|
||||
continue;
|
||||
}
|
||||
|
||||
var order = TopologicalSort.GetOrder(graphNodeRepository);
|
||||
var repositoryTaskItem = new TaskItem(repository.Name);
|
||||
repositoryTaskItem.SetMetadata("Order", order.ToString());
|
||||
repositoryTaskItem.SetMetadata("RootPath", repository.RootDir);
|
||||
repositoriesWithOrder.Add((repositoryTaskItem, order));
|
||||
}
|
||||
|
||||
return repositoriesWithOrder
|
||||
.OrderBy(r => r.order)
|
||||
.Select(r => r.repository)
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace RepoTools.BuildGraph
|
||||
{
|
||||
internal class ExternalDependency
|
||||
{
|
||||
public string PackageId { get; set; }
|
||||
public string Version { get; set; }
|
||||
public bool IsReferenced { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
namespace RepoTools.BuildGraph
|
||||
{
|
||||
public static class GraphBuilder
|
||||
{
|
||||
public static IList<GraphNode> Generate(IList<Repository> repositories, string root, TaskLoggingHelper log)
|
||||
{
|
||||
// Build global list of primary projects
|
||||
var primaryProjects = repositories.SelectMany(c => c.Projects)
|
||||
.ToDictionary(p => p.Name, StringComparer.OrdinalIgnoreCase);
|
||||
var graphNodes = repositories.Select(r => new GraphNode { Repository = r })
|
||||
.ToDictionary(r => r.Repository);
|
||||
|
||||
GraphNode searchRoot = null;
|
||||
|
||||
foreach (var project in repositories.SelectMany(r => r.AllProjects))
|
||||
{
|
||||
var thisProjectRepositoryNode = graphNodes[project.Repository];
|
||||
if (!string.IsNullOrEmpty(root) && string.Equals(root, project.Repository.Name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
searchRoot = thisProjectRepositoryNode;
|
||||
}
|
||||
|
||||
foreach (var packageDependency in project.PackageReferences)
|
||||
{
|
||||
if (primaryProjects.TryGetValue(packageDependency, out var dependencyProject))
|
||||
{
|
||||
var dependencyRepository = dependencyProject.Repository;
|
||||
var dependencyNode = graphNodes[dependencyRepository];
|
||||
|
||||
if (ReferenceEquals(thisProjectRepositoryNode, dependencyNode))
|
||||
{
|
||||
log.LogWarning("{0} has a package reference to a package produced in the same repo. {1} -> {2}", project.Repository.Name, Path.GetFileName(project.Path), packageDependency);
|
||||
}
|
||||
else
|
||||
{
|
||||
thisProjectRepositoryNode.Incoming.Add(dependencyNode);
|
||||
}
|
||||
|
||||
dependencyNode.Outgoing.Add(thisProjectRepositoryNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var results = new HashSet<GraphNode>();
|
||||
if (searchRoot != null)
|
||||
{
|
||||
Visit(results, searchRoot);
|
||||
return results.ToList();
|
||||
}
|
||||
|
||||
return graphNodes.Values.ToList();
|
||||
}
|
||||
|
||||
private static void Visit(HashSet<GraphNode> results, GraphNode searchRoot)
|
||||
{
|
||||
if (results.Add(searchRoot))
|
||||
{
|
||||
foreach (var node in searchRoot.Outgoing)
|
||||
{
|
||||
Visit(results, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace RepoTools.BuildGraph
|
||||
{
|
||||
[DebuggerDisplay("{Repository.Name}")]
|
||||
public class GraphNode
|
||||
{
|
||||
public Repository Repository { get; set; }
|
||||
|
||||
public ISet<GraphNode> Incoming { get; } = new HashSet<GraphNode>();
|
||||
|
||||
public ISet<GraphNode> Outgoing { get; } = new HashSet<GraphNode>();
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace RepoTools.BuildGraph
|
||||
{
|
||||
[DebuggerDisplay("{Name}")]
|
||||
public class Project
|
||||
{
|
||||
public Project(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
public string Version { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public Repository Repository { get; set; }
|
||||
|
||||
public ISet<string> PackageReferences { get; set; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
namespace RepoTools.BuildGraph
|
||||
{
|
||||
[DebuggerDisplay("{Name}")]
|
||||
public class Repository : IEquatable<Repository>
|
||||
{
|
||||
public Repository(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public string RootDir { get; set; }
|
||||
|
||||
public IList<Project> Projects { get; } = new List<Project>();
|
||||
|
||||
public IList<Project> SupportProjects { get; } = new List<Project>();
|
||||
|
||||
public IEnumerable<Project> AllProjects => Projects.Concat(SupportProjects);
|
||||
|
||||
public bool Equals(Repository other) => string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Name);
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace RepoTools.BuildGraph
|
||||
{
|
||||
public class TopologicalSort : IComparer<GraphNode>
|
||||
{
|
||||
public static readonly TopologicalSort Instance = new TopologicalSort();
|
||||
|
||||
public int Compare(GraphNode x, GraphNode y)
|
||||
{
|
||||
var xScore = GetOrder(x);
|
||||
var yScore = GetOrder(y);
|
||||
return xScore.CompareTo(yScore);
|
||||
}
|
||||
|
||||
public static int GetOrder(GraphNode node)
|
||||
{
|
||||
var visited = new List<GraphNode>();
|
||||
return GetOrder(node, visited);
|
||||
}
|
||||
|
||||
private static int GetOrder(GraphNode node, List<GraphNode> visited)
|
||||
{
|
||||
if (visited.Contains(node))
|
||||
{
|
||||
var cycle = string.Join(" -> ", visited.Select(v => v.Repository.Name));
|
||||
throw new Exception($"Cycle detected in the build graph: {cycle} -> {node.Repository.Name}.");
|
||||
}
|
||||
|
||||
var score = 0;
|
||||
visited.Add(node);
|
||||
foreach (var dependentNode in node.Incoming)
|
||||
{
|
||||
score = Math.Max(score, GetOrder(dependentNode, visited));
|
||||
}
|
||||
visited.RemoveAt(visited.Count - 1);
|
||||
|
||||
return score + 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,223 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NuGet.Frameworks;
|
||||
using NuGet.Packaging.Core;
|
||||
using NuGet.Versioning;
|
||||
using RepoTools.BuildGraph;
|
||||
using RepoTasks.ProjectModel;
|
||||
using RepoTasks.Utilities;
|
||||
|
||||
namespace RepoTasks
|
||||
{
|
||||
public class CheckRepoGraph : Task, ICancelableTask
|
||||
{
|
||||
private readonly CancellationTokenSource _cts = new CancellationTokenSource();
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] Solutions { get; set; }
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] Artifacts { get; set; }
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] Repositories { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Properties { get; set; }
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
_cts.Cancel();
|
||||
}
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
var packageArtifacts = Artifacts.Select(ArtifactInfo.Parse)
|
||||
.OfType<ArtifactInfo.Package>()
|
||||
.Where(p => !p.IsSymbolsArtifact)
|
||||
.ToDictionary(p => p.PackageInfo.Id, p => p, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
var factory = new SolutionInfoFactory(Log, BuildEngine5);
|
||||
var props = MSBuildListSplitter.GetNamedProperties(Properties);
|
||||
|
||||
if (!props.TryGetValue("Configuration", out var defaultConfig))
|
||||
{
|
||||
defaultConfig = "Debug";
|
||||
}
|
||||
|
||||
var solutions = factory.Create(Solutions, props, defaultConfig, _cts.Token).OrderBy(f => f.Directory).ToList();
|
||||
Log.LogMessage($"Found {solutions.Count} and {solutions.Sum(p => p.Projects.Count)} projects");
|
||||
|
||||
if (_cts.IsCancellationRequested)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var repoGraph = new AdjacencyMatrix(solutions.Count);
|
||||
var packageToProjectMap = new Dictionary<PackageIdentity, ProjectInfo>();
|
||||
|
||||
for (var i = 0; i < solutions.Count; i++)
|
||||
{
|
||||
var sln = repoGraph[i] = solutions[i];
|
||||
|
||||
foreach (var proj in sln.Projects)
|
||||
{
|
||||
if (!proj.IsPackable
|
||||
|| proj.FullPath.Contains("samples")
|
||||
|| proj.FullPath.Contains("tools/Microsoft.VisualStudio.Web.CodeGeneration.Design"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var id = new PackageIdentity(proj.PackageId, new NuGetVersion(proj.PackageVersion));
|
||||
|
||||
if (packageToProjectMap.TryGetValue(id, out var otherProj))
|
||||
{
|
||||
Log.LogError($"Both {proj.FullPath} and {otherProj.FullPath} produce {id}");
|
||||
continue;
|
||||
}
|
||||
|
||||
packageToProjectMap.Add(id, proj);
|
||||
}
|
||||
|
||||
var sharedSrc = Path.Combine(sln.Directory, "shared");
|
||||
if (Directory.Exists(sharedSrc))
|
||||
{
|
||||
foreach (var dir in Directory.GetDirectories(sharedSrc, "*.Sources"))
|
||||
{
|
||||
var id = GetDirectoryName(dir);
|
||||
var artifactInfo = packageArtifacts[id];
|
||||
var sharedSrcProj = new ProjectInfo(dir,
|
||||
Array.Empty<ProjectFrameworkInfo>(),
|
||||
Array.Empty<DotNetCliReferenceInfo>(),
|
||||
true,
|
||||
artifactInfo.PackageInfo.Id,
|
||||
artifactInfo.PackageInfo.Version.ToNormalizedString());
|
||||
sharedSrcProj.SolutionInfo = sln;
|
||||
var identity = new PackageIdentity(artifactInfo.PackageInfo.Id, artifactInfo.PackageInfo.Version);
|
||||
packageToProjectMap.Add(identity, sharedSrcProj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Log.HasLoggedErrors)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < solutions.Count; i++)
|
||||
{
|
||||
var src = repoGraph[i];
|
||||
|
||||
foreach (var proj in src.Projects)
|
||||
{
|
||||
if (!proj.IsPackable
|
||||
|| proj.FullPath.Contains("samples"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var dep in proj.Frameworks.SelectMany(f => f.Dependencies.Values))
|
||||
{
|
||||
if (packageToProjectMap.TryGetValue(new PackageIdentity(dep.Id, new NuGetVersion(dep.Version)), out var target))
|
||||
{
|
||||
var j = repoGraph.FindIndex(target.SolutionInfo);
|
||||
repoGraph.SetLink(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var toolDep in proj.Tools)
|
||||
{
|
||||
if (packageToProjectMap.TryGetValue(new PackageIdentity(toolDep.Id, new NuGetVersion(toolDep.Version)), out var target))
|
||||
{
|
||||
var j = repoGraph.FindIndex(target.SolutionInfo);
|
||||
repoGraph.SetLink(i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var repos = Repositories.ToDictionary(i => i.ItemSpec, i => i, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
for (var i = 0; i < repoGraph.Count; i++)
|
||||
{
|
||||
var src = repoGraph[i];
|
||||
var repoName = GetDirectoryName(src.Directory);
|
||||
var repo = repos[repoName];
|
||||
|
||||
var policy = Enum.Parse<PatchPolicy>(repo.GetMetadata("PatchPolicy"));
|
||||
|
||||
if ((policy & PatchPolicy.AlwaysUpdate) != 0 && !src.IsPatching)
|
||||
{
|
||||
Log.LogError($"{repoName} is not currently set to patch, but it should because the policy is set to always include this in servicing updates. Update the configuration in submodule.props.");
|
||||
continue;
|
||||
}
|
||||
|
||||
var srcShouldCascade = (policy & PatchPolicy.CascadeVersions) != 0;
|
||||
for (var j = 0; j < repoGraph.Count; j++)
|
||||
{
|
||||
if (j == i) continue;
|
||||
if (repoGraph.HasLink(i, j))
|
||||
{
|
||||
var target = repoGraph[j];
|
||||
var targetRepoName = GetDirectoryName(target.Directory);
|
||||
var targetRepo = repos[targetRepoName];
|
||||
|
||||
if (srcShouldCascade && !src.IsPatching && target.IsPatching)
|
||||
{
|
||||
Log.LogError($"{repoName} should be patching because it depend on {targetRepoName} and its patch policy is to cascade version changes. Update the configuration in submodule.props.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !Log.HasLoggedErrors;
|
||||
}
|
||||
|
||||
private static string GetDirectoryName(string path)
|
||||
=> Path.GetFileName(path.TrimEnd(new[] { '\\', '/' }));
|
||||
|
||||
private class AdjacencyMatrix
|
||||
{
|
||||
private readonly bool[,] _matrix;
|
||||
private readonly SolutionInfo[] _items;
|
||||
|
||||
public AdjacencyMatrix(int size)
|
||||
{
|
||||
_matrix = new bool[size, size];
|
||||
_items = new SolutionInfo[size];
|
||||
Count = size;
|
||||
}
|
||||
|
||||
public SolutionInfo this[int idx]
|
||||
{
|
||||
get => _items[idx];
|
||||
set => _items[idx] = value;
|
||||
}
|
||||
|
||||
public int FindIndex(SolutionInfo item)
|
||||
{
|
||||
return Array.FindIndex(_items, t => t.Equals(item));
|
||||
}
|
||||
|
||||
public int Count { get; }
|
||||
|
||||
public bool HasLink(int source, int target) => _matrix[source, target];
|
||||
|
||||
public void SetLink(int source, int target)
|
||||
{
|
||||
_matrix[source, target] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Logging;
|
||||
|
||||
namespace RepoTasks
|
||||
{
|
||||
public class FlowLogger : ConsoleLogger
|
||||
{
|
||||
private volatile bool _initialized;
|
||||
|
||||
public FlowLogger()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Initialize(IEventSource eventSource, int nodeCount)
|
||||
{
|
||||
PreInit(eventSource);
|
||||
base.Initialize(eventSource, nodeCount);
|
||||
}
|
||||
|
||||
public override void Initialize(IEventSource eventSource)
|
||||
{
|
||||
PreInit(eventSource);
|
||||
base.Initialize(eventSource);
|
||||
}
|
||||
|
||||
private void PreInit(IEventSource eventSource)
|
||||
{
|
||||
if (_initialized) return;
|
||||
_initialized = true;
|
||||
|
||||
var flowId = GetFlowId();
|
||||
var prefix = $"{flowId,-22}| ";
|
||||
var write = WriteHandler;
|
||||
WriteHandler = msg => write(prefix + msg);
|
||||
|
||||
eventSource.BuildStarted += (o, e) =>
|
||||
{
|
||||
WriteHandler(e.Message + Environment.NewLine);
|
||||
};
|
||||
}
|
||||
|
||||
private string GetFlowId()
|
||||
{
|
||||
var parameters = Parameters?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parameters == null || parameters.Length == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
const string flowIdParamName = "FlowId=";
|
||||
return parameters
|
||||
.FirstOrDefault(p => p.StartsWith(flowIdParamName, StringComparison.Ordinal))
|
||||
?.Substring(flowIdParamName.Length);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class DotNetCliReferenceInfo
|
||||
{
|
||||
public DotNetCliReferenceInfo(string id, string version)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
throw new ArgumentException(nameof(id));
|
||||
}
|
||||
|
||||
Id = id;
|
||||
Version = version;
|
||||
}
|
||||
|
||||
public string Id { get; }
|
||||
public string Version { get; }
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NuGet.Frameworks;
|
||||
using NuGet.Packaging;
|
||||
using NuGet.Versioning;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class PackageInfo
|
||||
{
|
||||
public PackageInfo(string id,
|
||||
NuGetVersion version,
|
||||
IReadOnlyList<PackageDependencyGroup> dependencyGroups,
|
||||
string source,
|
||||
string packageType = "Dependency")
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
throw new ArgumentException(nameof(id));
|
||||
}
|
||||
|
||||
Id = id;
|
||||
Version = version ?? throw new ArgumentNullException(nameof(version));
|
||||
PackageType = packageType;
|
||||
Source = source;
|
||||
DependencyGroups = dependencyGroups ?? Array.Empty<PackageDependencyGroup>();
|
||||
}
|
||||
|
||||
public string Id { get; }
|
||||
public NuGetVersion Version { get; }
|
||||
public string PackageType { get; }
|
||||
/// <summary>
|
||||
/// Can be a https feed or a file path. May be null.
|
||||
/// </summary>
|
||||
public string Source { get; }
|
||||
public IReadOnlyList<PackageDependencyGroup> DependencyGroups { get; }
|
||||
|
||||
public override string ToString() => $"{Id}/{Version}";
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class PackageReferenceInfo
|
||||
{
|
||||
public PackageReferenceInfo(string id, string version, bool isImplicitlyDefined)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
throw new ArgumentException(nameof(id));
|
||||
}
|
||||
|
||||
Id = id;
|
||||
Version = version;
|
||||
IsImplicitlyDefined = isImplicitlyDefined;
|
||||
}
|
||||
|
||||
public string Id { get; }
|
||||
public string Version { get; }
|
||||
public bool IsImplicitlyDefined { get; }
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NuGet.Frameworks;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
[Flags]
|
||||
internal enum PatchPolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// Only produce new package versions if there were changes to product code.
|
||||
/// </summary>
|
||||
ProductChangesOnly = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// Packages should update in every patch.
|
||||
/// </summary>
|
||||
AlwaysUpdate = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// Produce new package versions if there were changes to product code, or if one of the package dependencies has updated.
|
||||
/// </summary>
|
||||
CascadeVersions = 1 << 2,
|
||||
|
||||
AlwaysUpdateAndCascadeVersions = CascadeVersions | AlwaysUpdate,
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NuGet.Frameworks;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class ProjectFrameworkInfo
|
||||
{
|
||||
public ProjectFrameworkInfo(NuGetFramework targetFramework, IReadOnlyDictionary<string, PackageReferenceInfo> dependencies)
|
||||
{
|
||||
TargetFramework = targetFramework ?? throw new ArgumentNullException(nameof(targetFramework));
|
||||
Dependencies = dependencies ?? throw new ArgumentNullException(nameof(dependencies));
|
||||
}
|
||||
|
||||
public NuGetFramework TargetFramework { get; }
|
||||
public IReadOnlyDictionary<string, PackageReferenceInfo> Dependencies { get; }
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class ProjectInfo
|
||||
{
|
||||
public ProjectInfo(string fullPath,
|
||||
IReadOnlyList<ProjectFrameworkInfo> frameworks,
|
||||
IReadOnlyList<DotNetCliReferenceInfo> tools,
|
||||
bool isPackable,
|
||||
string packageId,
|
||||
string packageVersion)
|
||||
{
|
||||
if (!Path.IsPathRooted(fullPath))
|
||||
{
|
||||
throw new ArgumentException("Path must be absolute", nameof(fullPath));
|
||||
}
|
||||
|
||||
Frameworks = frameworks ?? throw new ArgumentNullException(nameof(frameworks));
|
||||
Tools = tools ?? throw new ArgumentNullException(nameof(tools));
|
||||
|
||||
FullPath = fullPath;
|
||||
FileName = Path.GetFileName(fullPath);
|
||||
Directory = Path.GetDirectoryName(FullPath);
|
||||
IsPackable = isPackable;
|
||||
PackageId = packageId;
|
||||
PackageVersion = packageVersion;
|
||||
}
|
||||
|
||||
public string FullPath { get; }
|
||||
public string FileName { get; }
|
||||
public string Directory { get; }
|
||||
public string PackageId { get; }
|
||||
public string PackageVersion { get; }
|
||||
public bool IsPackable { get; }
|
||||
|
||||
public SolutionInfo SolutionInfo { get; set; }
|
||||
|
||||
public IReadOnlyList<ProjectFrameworkInfo> Frameworks { get; }
|
||||
public IReadOnlyList<DotNetCliReferenceInfo> Tools { get; }
|
||||
}
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Construction;
|
||||
using Microsoft.Build.Evaluation;
|
||||
using Microsoft.Build.Execution;
|
||||
using NuGet.Frameworks;
|
||||
using RepoTasks.Utilities;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class ProjectInfoFactory
|
||||
{
|
||||
private readonly TaskLoggingHelper _logger;
|
||||
|
||||
public ProjectInfoFactory(TaskLoggingHelper logger)
|
||||
{
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
public ProjectInfo Create(string path, ProjectCollection projectCollection)
|
||||
{
|
||||
var project = GetProject(path, projectCollection);
|
||||
var instance = project.CreateProjectInstance(ProjectInstanceSettings.ImmutableWithFastItemLookup);
|
||||
|
||||
var targetFrameworks = instance.GetPropertyValue("TargetFrameworks");
|
||||
var targetFramework = instance.GetPropertyValue("TargetFramework");
|
||||
|
||||
var frameworks = new List<ProjectFrameworkInfo>();
|
||||
if (!string.IsNullOrEmpty(targetFrameworks) && string.IsNullOrEmpty(targetFramework))
|
||||
{
|
||||
// multi targeting
|
||||
foreach (var tfm in targetFrameworks.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
project.SetGlobalProperty("TargetFramework", tfm);
|
||||
var innerBuild = project.CreateProjectInstance(ProjectInstanceSettings.ImmutableWithFastItemLookup);
|
||||
|
||||
var tfmInfo = new ProjectFrameworkInfo(NuGetFramework.Parse(tfm), GetDependencies(innerBuild));
|
||||
|
||||
frameworks.Add(tfmInfo);
|
||||
}
|
||||
|
||||
project.RemoveGlobalProperty("TargetFramework");
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(targetFramework))
|
||||
{
|
||||
var tfmInfo = new ProjectFrameworkInfo(NuGetFramework.Parse(targetFramework), GetDependencies(instance));
|
||||
|
||||
frameworks.Add(tfmInfo);
|
||||
}
|
||||
|
||||
var projectDir = Path.GetDirectoryName(path);
|
||||
|
||||
var tools = GetTools(instance).ToArray();
|
||||
bool.TryParse(instance.GetPropertyValue("IsPackable"), out var isPackable);
|
||||
|
||||
if (isPackable)
|
||||
{
|
||||
// the default packable setting is disabled for projects referencing this package.
|
||||
isPackable = !frameworks.SelectMany(f => f.Dependencies.Keys).Any(d => d.Equals("Microsoft.NET.Test.Sdk", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
var packageId = instance.GetPropertyValue("PackageId");
|
||||
var packageVersion = instance.GetPropertyValue("PackageVersion");
|
||||
|
||||
return new ProjectInfo(path,
|
||||
frameworks,
|
||||
tools,
|
||||
isPackable,
|
||||
packageId,
|
||||
packageVersion);
|
||||
}
|
||||
|
||||
private static object _projLock = new object();
|
||||
|
||||
private static Project GetProject(string path, ProjectCollection projectCollection)
|
||||
{
|
||||
var projects = projectCollection.GetLoadedProjects(path);
|
||||
foreach(var proj in projects)
|
||||
{
|
||||
if (proj.GetPropertyValue("DesignTimeBuild") == "true")
|
||||
{
|
||||
return proj;
|
||||
}
|
||||
}
|
||||
|
||||
var xml = ProjectRootElement.Open(path, projectCollection);
|
||||
var globalProps = new Dictionary<string, string>()
|
||||
{
|
||||
["DesignTimeBuild"] = "true",
|
||||
// Isolate the project from post-restore side effects
|
||||
["ExcludeRestorePackageImports"] = "true",
|
||||
};
|
||||
|
||||
var project = new Project(xml,
|
||||
globalProps,
|
||||
toolsVersion: "15.0",
|
||||
projectCollection: projectCollection)
|
||||
{
|
||||
IsBuildEnabled = false
|
||||
};
|
||||
|
||||
return project;
|
||||
}
|
||||
|
||||
private IReadOnlyDictionary<string, PackageReferenceInfo> GetDependencies(ProjectInstance project)
|
||||
{
|
||||
var references = new Dictionary<string, PackageReferenceInfo>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var item in project.GetItems("PackageReference"))
|
||||
{
|
||||
bool.TryParse(item.GetMetadataValue("IsImplicitlyDefined"), out var isImplicit);
|
||||
|
||||
var info = new PackageReferenceInfo(item.EvaluatedInclude, item.GetMetadataValue("Version"), isImplicit);
|
||||
|
||||
if (references.ContainsKey(info.Id))
|
||||
{
|
||||
_logger.LogKoreBuildWarning(project.ProjectFileLocation.File, KoreBuildErrors.DuplicatePackageReference, $"Found a duplicate PackageReference for {info.Id}. Restore results may be unpredictable.");
|
||||
}
|
||||
|
||||
references[info.Id] = info;
|
||||
}
|
||||
|
||||
return references;
|
||||
}
|
||||
|
||||
private static IEnumerable<DotNetCliReferenceInfo> GetTools(ProjectInstance project)
|
||||
{
|
||||
return project.GetItems("DotNetCliToolReference").Select(item =>
|
||||
new DotNetCliReferenceInfo(item.EvaluatedInclude, item.GetMetadataValue("Version")));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class SolutionInfo
|
||||
{
|
||||
public SolutionInfo(string fullPath, string configName, IReadOnlyList<ProjectInfo> projects, bool shouldBuild, bool isPatching)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
throw new ArgumentException(nameof(fullPath));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(configName))
|
||||
{
|
||||
throw new ArgumentException(nameof(configName));
|
||||
}
|
||||
|
||||
FullPath = fullPath;
|
||||
Directory = Path.GetDirectoryName(fullPath);
|
||||
ConfigName = configName;
|
||||
Projects = projects ?? throw new ArgumentNullException(nameof(projects));
|
||||
ShouldBuild = shouldBuild;
|
||||
IsPatching = isPatching;
|
||||
foreach (var proj in Projects)
|
||||
{
|
||||
proj.SolutionInfo = this;
|
||||
}
|
||||
}
|
||||
|
||||
public string FullPath { get; }
|
||||
public string Directory { get; }
|
||||
public string ConfigName { get; }
|
||||
public IReadOnlyList<ProjectInfo> Projects { get; }
|
||||
public bool ShouldBuild { get; }
|
||||
public bool IsPatching { get; }
|
||||
public PatchPolicy PatchPolicy { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Build.Construction;
|
||||
using Microsoft.Build.Evaluation;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using RepoTasks.Utilities;
|
||||
|
||||
namespace RepoTasks.ProjectModel
|
||||
{
|
||||
internal class SolutionInfoFactory
|
||||
{
|
||||
private readonly TaskLoggingHelper _logger;
|
||||
private readonly IBuildEngine4 _buildEngine;
|
||||
|
||||
public SolutionInfoFactory(TaskLoggingHelper logger, IBuildEngine4 buildEngine)
|
||||
{
|
||||
_logger = logger;
|
||||
_buildEngine = buildEngine;
|
||||
}
|
||||
|
||||
public IReadOnlyList<SolutionInfo> Create(IEnumerable<ITaskItem> solutionItems, IDictionary<string, string> properties, string defaultConfig, CancellationToken ct)
|
||||
{
|
||||
var timer = Stopwatch.StartNew();
|
||||
|
||||
var solutions = new ConcurrentBag<SolutionInfo>();
|
||||
|
||||
Parallel.ForEach(solutionItems, solution =>
|
||||
{
|
||||
if (ct.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var solutionFile = solution.ItemSpec.Replace('\\', '/');
|
||||
var solutionProps = new Dictionary<string, string>(properties, StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var prop in MSBuildListSplitter.GetNamedProperties(solution.GetMetadata("AdditionalProperties")))
|
||||
{
|
||||
solutionProps[prop.Key] = prop.Value;
|
||||
}
|
||||
|
||||
if (!solutionProps.TryGetValue("Configuration", out var configName))
|
||||
{
|
||||
solutionProps["Configuration"] = configName = defaultConfig;
|
||||
}
|
||||
|
||||
var key = $"SlnInfo:{solutionFile}:{configName}";
|
||||
var obj = _buildEngine.GetRegisteredTaskObject(key, RegisteredTaskObjectLifetime.Build);
|
||||
|
||||
if (obj is SolutionInfo cachedSlnInfo)
|
||||
{
|
||||
solutions.Add(cachedSlnInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.LogMessage($"Analyzing {solutionFile} ({configName})");
|
||||
var projects = new ConcurrentBag<ProjectInfo>();
|
||||
var projectFiles = GetProjectsForSolutionConfig(solutionFile, configName);
|
||||
using (var projCollection = new ProjectCollection(solutionProps) { IsBuildEnabled = false })
|
||||
{
|
||||
Parallel.ForEach(projectFiles, projectFile =>
|
||||
{
|
||||
if (ct.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
projects.Add(new ProjectInfoFactory(_logger).Create(projectFile, projCollection));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogErrorFromException(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bool.TryParse(solution.GetMetadata("Build"), out var shouldBuild);
|
||||
bool.TryParse(solution.GetMetadata("IsPatching"), out var isPatching);
|
||||
|
||||
var solutionInfo = new SolutionInfo(
|
||||
solutionFile,
|
||||
configName,
|
||||
projects.ToArray(),
|
||||
shouldBuild,
|
||||
isPatching);
|
||||
|
||||
_buildEngine.RegisterTaskObject(key, solutionInfo, RegisteredTaskObjectLifetime.Build, allowEarlyCollection: true);
|
||||
|
||||
solutions.Add(solutionInfo);
|
||||
});
|
||||
|
||||
timer.Stop();
|
||||
_logger.LogMessage(MessageImportance.High, $"Finished design-time build in {timer.ElapsedMilliseconds}ms");
|
||||
return solutions.ToArray();
|
||||
}
|
||||
|
||||
private IList<string> GetProjectsForSolutionConfig(string filePath, string configName)
|
||||
{
|
||||
var sln = SolutionFile.Parse(filePath);
|
||||
|
||||
if (string.IsNullOrEmpty(configName))
|
||||
{
|
||||
configName = sln.GetDefaultConfigurationName();
|
||||
}
|
||||
|
||||
var projects = new List<string>();
|
||||
|
||||
var config = sln.SolutionConfigurations.FirstOrDefault(c => c.ConfigurationName == configName);
|
||||
if (config == null)
|
||||
{
|
||||
throw new InvalidOperationException($"A solution configuration by the name of '{configName}' was not found in '{filePath}'");
|
||||
}
|
||||
|
||||
foreach (var project in sln.ProjectsInOrder
|
||||
.Where(p =>
|
||||
p.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat // skips solution folders
|
||||
&& p.ProjectConfigurations.TryGetValue(config.FullName, out var projectConfig)
|
||||
&& projectConfig.IncludeInBuild))
|
||||
{
|
||||
projects.Add(project.AbsolutePath.Replace('\\', '/'));
|
||||
}
|
||||
|
||||
return projects;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,14 +2,15 @@
|
|||
<Import Project="$(RepoTasksSdkPath)\Sdk.props" Condition="'$(RepoTasksSdkPath)' != '' "/>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core' ">net461</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Remove="Internal.AspNetCore.Sdk" />
|
||||
<PackageReference Include="Microsoft.DotNet.Archive" Version="$(MicrosoftDotNetArchivePackageVersion)" />
|
||||
<PackageReference Include="NuGet.Build.Tasks" Version="$(NuGetInMSBuildVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(DevDependency_MicrosoftExtensionsDependencyModelPackageVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="NuGet.Build.Tasks" Version="$(NuGetInMSBuildVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(DevDependency_MicrosoftExtensionsDependencyModelPackageVersion)" />
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="$(DevDependency_WindowsAzureStoragePackageVersion)" />
|
||||
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(DevDependency_MicrosoftDotNetBuildTasksFeedPackageVersion)" ExcludeAssets="Build" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NuGet.Frameworks;
|
||||
using NuGet.Packaging;
|
||||
using NuGet.Packaging.Core;
|
||||
using NuGet.Versioning;
|
||||
using Microsoft.Build.Framework;
|
||||
using RepoTasks.ProjectModel;
|
||||
|
||||
namespace RepoTasks.Utilities
|
||||
{
|
||||
internal abstract class ArtifactInfo
|
||||
{
|
||||
public static ArtifactInfo Parse(ITaskItem item)
|
||||
{
|
||||
ArtifactInfo info;
|
||||
switch (item.GetMetadata("ArtifactType").ToLowerInvariant())
|
||||
{
|
||||
case "nugetpackage":
|
||||
info = new Package { PackageInfo = GetPackageInfo(item) };
|
||||
break;
|
||||
case "nugetsymbolspackage":
|
||||
info = new Package { PackageInfo = GetPackageInfo(item), IsSymbolsArtifact = true };
|
||||
break;
|
||||
default:
|
||||
return UnknownType.Singleton;
|
||||
}
|
||||
|
||||
info.RepositoryRoot = item.GetMetadata("RepositoryRoot")?.TrimEnd(new [] { '\\', '/' });
|
||||
|
||||
if (!string.IsNullOrEmpty(info.RepositoryRoot))
|
||||
{
|
||||
info.RepoName = Path.GetFileName(info.RepositoryRoot);
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
public string RepositoryRoot { get; private set; }
|
||||
public string RepoName { get; private set; }
|
||||
|
||||
public class UnknownType : ArtifactInfo
|
||||
{
|
||||
private UnknownType() { }
|
||||
public static UnknownType Singleton { get; } = new UnknownType();
|
||||
}
|
||||
|
||||
public class Package : ArtifactInfo
|
||||
{
|
||||
public PackageInfo PackageInfo { get; set; }
|
||||
public bool IsSymbolsArtifact { get; set; }
|
||||
}
|
||||
|
||||
private static PackageInfo GetPackageInfo(ITaskItem item)
|
||||
{
|
||||
return new PackageInfo(
|
||||
item.GetMetadata("PackageId"),
|
||||
NuGetVersion.Parse(item.GetMetadata("Version")),
|
||||
string.IsNullOrEmpty(item.GetMetadata("TargetFramework"))
|
||||
? MSBuildListSplitter.SplitItemList(item.GetMetadata("TargetFramework")).Select(s => new PackageDependencyGroup(NuGetFramework.Parse(s), Array.Empty<PackageDependency>())).ToArray()
|
||||
: new [] { new PackageDependencyGroup(NuGetFramework.Parse(item.GetMetadata("TargetFramework")), Array.Empty<PackageDependency>()) },
|
||||
Path.GetDirectoryName(item.ItemSpec),
|
||||
item.GetMetadata("PackageType"));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,24 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.1/tools/korebuild.schema.json",
|
||||
"channel": "release/2.1",
|
||||
"msbuildType": "full",
|
||||
"toolsets": {
|
||||
"nodejs": {
|
||||
"minVersion": "8.0",
|
||||
"required": true
|
||||
},
|
||||
"visualstudio": {
|
||||
"required": [
|
||||
"Windows"
|
||||
],
|
||||
"includePrerelease": true,
|
||||
"versionRange": "[15.8, 16.0)",
|
||||
"requiredWorkloads": [
|
||||
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81",
|
||||
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
||||
"Microsoft.VisualStudio.Component.VC.ATL",
|
||||
"Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
#!/usr/bin/env pwsh
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Generates a tag on this repo and adds a tag for each submodule that corresponds
|
||||
to the value in version.props
|
||||
.PARAMETER Push
|
||||
Push the tag to origin
|
||||
.PARAMETER OutFile
|
||||
When specified, generate a .csv with repo names and tags
|
||||
.PARAMETER WhatIf
|
||||
Dry run
|
||||
#>
|
||||
[cmdletbinding(PositionalBinding = $false, SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[switch]$Push,
|
||||
[string]$OutFile
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
|
||||
Set-StrictMode -Version 1
|
||||
|
||||
function New-GitTag {
|
||||
[cmdletbinding(SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Repo,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Tag
|
||||
)
|
||||
|
||||
Push-Location $Repo
|
||||
try {
|
||||
git show-ref --tags --verify "refs/tags/$Tag" -q
|
||||
$existingTag = $?
|
||||
|
||||
if ($existingTag) {
|
||||
Write-Warning "${Repo}: Tag '$Tag' already exists. Skipped adding tag"
|
||||
}
|
||||
else {
|
||||
if ($PSCmdlet.ShouldProcess($Repo, "Tag $Tag")) {
|
||||
Invoke-Block { & git tag -m "v$Tag" $Tag HEAD }
|
||||
Write-Host -f Magenta "${Repo}: added tag '$Tag'"
|
||||
}
|
||||
|
||||
if ($Push -and $PSCmdlet.ShouldProcess($Repo, "Push tag $Tag to origin")) {
|
||||
Invoke-Block { & git push origin refs/tags/$Tag }
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Gets the package version by invoking KoreBuild on a repo with a custom target that spits out the package version
|
||||
#
|
||||
function Get-PackageVersion([string]$repoRoot) {
|
||||
$buildScript = if (-not $IsCoreCLR -or $IsWindows) { 'build.ps1' } else { 'build.sh' }
|
||||
$inspectTarget = "/p:CustomAfterKoreBuildTargets=$PSScriptRoot/GetPackageVersion.targets"
|
||||
Write-Verbose "Running `"$repoRoot/$buildScript`" $inspectTarget /v:m /p:IsFinalBuild=true /t:Noop /t:GetPackageVersion"
|
||||
# Add the /t:Noop target which may be used by the bootstrapper to skip unimportant initialization
|
||||
$output = & "$repoRoot/$buildScript" $inspectTarget /v:m /p:IsFinalBuild=true /t:Noop /t:GetPackageVersion
|
||||
$output | out-string | Write-Verbose
|
||||
if (-not $? -or $LASTEXITCODE -ne 0) {
|
||||
throw "$buildScript failed on $repoRoot. Exit code $LASTEXITCODE"
|
||||
}
|
||||
$packageVersion = $output | where-object { $_ -like '*PackageVersion=*' } | select-object -first 1
|
||||
$packageVersion = $packageVersion -replace 'PackageVersion=', ''
|
||||
if ($packageVersion) { $packageVersion = $packageVersion.Trim() }
|
||||
if (-not $packageVersion) {
|
||||
throw "Could not determine final package version for $repoRoot"
|
||||
}
|
||||
return $packageVersion.Trim()
|
||||
}
|
||||
|
||||
$repoRoot = Resolve-Path "$PSScriptRoot/../"
|
||||
|
||||
Write-Warning "Make sure you have run ``git submodule update`` first to pin the submodules to the correct commit"
|
||||
if (-not $PSCmdlet.ShouldContinue("Continue?", "This will apply tags to all submodules")) {
|
||||
Write-Host "Exiting"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
$repoTag = Get-PackageVersion $repoRoot
|
||||
New-GitTag $repoRoot $repoTag -WhatIf:$WhatIfPreference
|
||||
|
||||
$tags = @([pscustomobject] @{
|
||||
repo = $(git config remote.origin.url)
|
||||
tag = $repoTag
|
||||
commit = $(git rev-parse HEAD)
|
||||
})
|
||||
|
||||
Get-Submodules $repoRoot | ForEach-Object {
|
||||
$modPath = $_.path
|
||||
$module = $_.module
|
||||
if (-not (Test-Path (Join-Path $_.path 'version.props'))) {
|
||||
Write-Warning "$module does not have a version.props file. Skipping"
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
$tag = Get-PackageVersion $_.path
|
||||
if ($tag -ne $repoTag) {
|
||||
Write-Warning "${module}: version ($tag) does not match repo ($repoTag)"
|
||||
}
|
||||
$tags += [pscustomobject] @{
|
||||
repo = $_.remote
|
||||
tag = $tag
|
||||
commit = $_.commit
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Warning "${module}: Could not automatically determine tag for $modPath. Skipping"
|
||||
return
|
||||
}
|
||||
|
||||
New-GitTag $_.path $tag -WhatIf:$WhatIfPreference
|
||||
}
|
||||
|
||||
$tags | Format-Table
|
||||
|
||||
if ($OutFile) {
|
||||
$tags | Select-Object -Property * | Export-Csv -Path $OutFile -WhatIf:$false -NoTypeInformation
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<Project>
|
||||
<Target Name="GetPackageVersion">
|
||||
<Message Importance="high" Text="PackageVersion=$(PackageVersion)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env pwsh
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists the version of all submodules and this repo
|
||||
.PARAMETER Shipping
|
||||
Only list repos that are shipping
|
||||
#>
|
||||
[cmdletbinding(SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[switch]$Shipping = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 2
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
|
||||
|
||||
Assert-Git
|
||||
|
||||
$RepoRoot = Resolve-Path "$PSScriptRoot/../"
|
||||
|
||||
Get-Submodules $RepoRoot -Shipping:$Shipping | Format-Table -Property 'module','versionPrefix'
|
|
@ -1,111 +0,0 @@
|
|||
#!/usr/bin/env pwsh -c
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Updates the version.props file in repos to a newer patch version
|
||||
.PARAMETER Repos
|
||||
A list of the repositories that should be patched
|
||||
.PARAMETER Mode
|
||||
Version bump options: Major, Minor, Patch
|
||||
.PARAMETER VersionSuffix
|
||||
The version suffix to use
|
||||
#>
|
||||
[cmdletbinding(SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string[]]$Repos,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet('Major', 'Minor', 'Patch')]
|
||||
[string]$Mode,
|
||||
[string]$VersionSuffix = $null,
|
||||
[switch]$NoCommit
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
|
||||
|
||||
function SetVersionSuffix([System.Xml.XmlNode]$node) {
|
||||
if (-not $node) {
|
||||
return
|
||||
}
|
||||
$node.InnerText = $VersionSuffix
|
||||
return "Setting $($node.Name) to $VersionSuffix"
|
||||
}
|
||||
|
||||
function BumpVersion([System.Xml.XmlNode]$node) {
|
||||
if (-not $node) {
|
||||
return
|
||||
}
|
||||
[version] $version = $node.InnerText
|
||||
|
||||
$experimental = $version.Major -eq 0
|
||||
|
||||
switch ($mode) {
|
||||
{ ($_ -ne 'Patch') -and $experimental} {
|
||||
$node.InnerText = "{0}.{1}.{2}" -f $version.Major, ($version.Minor + 1), 0
|
||||
}
|
||||
{ ($_ -eq 'Major') -and -not $experimental } {
|
||||
$node.InnerText = "{0}.{1}.{2}" -f ($version.Major + 1), 0, 0
|
||||
}
|
||||
{ ($_ -eq 'Minor') -and -not $experimental } {
|
||||
$node.InnerText = "{0}.{1}.{2}" -f $version.Major, ($version.Minor + 1), 0
|
||||
}
|
||||
'Patch' {
|
||||
$node.InnerText = "{0}.{1}.{2}" -f $version.Major, $version.Minor, ($version.Build + 1)
|
||||
}
|
||||
default {
|
||||
throw "Could not figure out how to apply patch policy $mode"
|
||||
}
|
||||
}
|
||||
return "Bumping version from $version to $($node.InnerText)"
|
||||
}
|
||||
|
||||
foreach ($repo in $Repos) {
|
||||
$repoPath = "$PSScriptRoot/../modules/$repo"
|
||||
Push-Location $repoPath
|
||||
try
|
||||
{
|
||||
$path = "$repoPath/version.props"
|
||||
Write-Host -ForegroundColor Magenta "Updating $repo"
|
||||
if (-not (Test-Path $path)) {
|
||||
Write-Warning "$path does not exist"
|
||||
continue
|
||||
}
|
||||
$path = Resolve-Path $path
|
||||
Write-Verbose "$path"
|
||||
[xml] $xml = LoadXml $path
|
||||
|
||||
$suffix = $xml.SelectSingleNode('/Project/PropertyGroup/VersionSuffix')
|
||||
if (-not $suffix) {
|
||||
write-error "$path does not have VersionSuffix"
|
||||
}
|
||||
|
||||
if ($VersionSuffix) {
|
||||
SetVersionSuffix $xml.SelectSingleNode('/Project/PropertyGroup/VersionSuffix') | write-host
|
||||
SetVersionSuffix $xml.SelectSingleNode('/Project/PropertyGroup/ExperimentalProjectVersionSuffix') | write-host
|
||||
SetVersionSuffix $xml.SelectSingleNode('/Project/PropertyGroup/ExperimentalVersionSuffix') | write-host
|
||||
}
|
||||
|
||||
$versionPrefix = $xml.SelectSingleNode('/Project/PropertyGroup/VersionPrefix')
|
||||
$epxVersionPrefix = $xml.SelectSingleNode('/Project/PropertyGroup/ExperimentalProjectVersionPrefix')
|
||||
$exVersionPrefix = $xml.SelectSingleNode('/Project/PropertyGroup/ExperimentalVersionPrefix')
|
||||
BumpVersion $epxVersionPrefix | write-host
|
||||
BumpVersion $exVersionPrefix | write-host
|
||||
$message = BumpVersion $versionPrefix
|
||||
Write-Host $message
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("Update $path")) {
|
||||
SaveXml $xml $path
|
||||
if (-not $NoCommit) {
|
||||
Invoke-Block { & git add $path }
|
||||
Invoke-Block { & git commit -m $message }
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
#!/usr/bin/env pwsh
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Tags each repo according to VersionPrefix in version.props of that repo
|
||||
.PARAMETER Push
|
||||
Push all updated tags
|
||||
.PARAMETER ForceUpdateTag
|
||||
This will call git tag --force
|
||||
#>
|
||||
[cmdletbinding(SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[switch]$Push = $false,
|
||||
[switch]$ForceUpdateTag = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 2
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
|
||||
|
||||
Assert-Git
|
||||
|
||||
$RepoRoot = Resolve-Path "$PSScriptRoot/../"
|
||||
|
||||
Get-Submodules $RepoRoot -Shipping | % {
|
||||
Push-Location $_.path | Out-Null
|
||||
try {
|
||||
|
||||
if (-not $_.versionPrefix) {
|
||||
Write-Warning "Could not determine tag version for $(_.path)"
|
||||
}
|
||||
else {
|
||||
$tag = $_.versionPrefix
|
||||
Write-Host "$($_.module) => $tag"
|
||||
|
||||
$gitTagArgs = @()
|
||||
if ($ForceUpdateTag) {
|
||||
$gitTagArgs += '--force'
|
||||
}
|
||||
|
||||
Invoke-Block { & git tag @gitTagArgs $tag }
|
||||
|
||||
if ($Push) {
|
||||
$gitPushArgs = @()
|
||||
if ($WhatIfPreference) {
|
||||
$gitPushArgs += '--dry-run'
|
||||
}
|
||||
Invoke-Block { & git push @gitPushArgs origin "refs/tags/${tag}" }
|
||||
}
|
||||
|
||||
if ($WhatIfPreference) {
|
||||
Invoke-Block { & git tag -d $tag } | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host -ForegroundColor Red "Could not update $_"
|
||||
throw
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,134 +0,0 @@
|
|||
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[switch]$NoCommit,
|
||||
[string]$GithubEmail,
|
||||
[string]$GithubUsername,
|
||||
[string]$GithubToken
|
||||
)
|
||||
# This script only works against dev/master at the moment because only master prod-con builds allow you to access their results before the entire chain is finished.
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
|
||||
Set-StrictMode -Version 1
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$githubRaw = "https://raw.githubusercontent.com"
|
||||
$versionsRepo = "dotnet/versions"
|
||||
$versionsBranch = "master"
|
||||
|
||||
$coreSetupRepo = "dotnet/core-setup"
|
||||
$coreFxRepo = "dotnet/corefx"
|
||||
|
||||
$coreSetupVersions = "$githubRaw/$versionsRepo/$versionsBranch/build-info/$coreSetupRepo/master/Latest_Packages.txt"
|
||||
|
||||
$tempDir = "$PSScriptRoot/../obj"
|
||||
|
||||
mkdir -Path $tempDir -ErrorAction Ignore
|
||||
|
||||
$localCoreSetupVersions = "$tempDir/coresetup.packages"
|
||||
Write-Host "Downloading $coreSetupVersions to $localCoreSetupVersions"
|
||||
Invoke-WebRequest -OutFile $localCoreSetupVersions -Uri $coreSetupVersions
|
||||
|
||||
$msNetCoreAppPackageVersion = $null
|
||||
$msNetCoreAppPackageName = "Microsoft.NETCore.App"
|
||||
|
||||
Set-GitHubInfo $GithubToken $GithubUsername $GithubEmail
|
||||
|
||||
$variables = @{}
|
||||
|
||||
foreach ($line in Get-Content $localCoreSetupVersions) {
|
||||
if ($line.StartsWith("$msNetCoreAppPackageName ")) {
|
||||
$msNetCoreAppPackageVersion = $line.Trim("$msNetCoreAppPackageName ")
|
||||
}
|
||||
$parts = $line.Split(' ')
|
||||
$packageName = $parts[0]
|
||||
|
||||
$varName = "$packageName" + "PackageVersion"
|
||||
$varName = $varName.Replace('.', '')
|
||||
|
||||
$packageVersion = $parts[1]
|
||||
if ($variables[$varName]) {
|
||||
if ($variables[$varName].Where( {$_ -eq $packageVersion}, 'First').Count -eq 0) {
|
||||
$variables[$varName] += $packageVersion
|
||||
}
|
||||
}
|
||||
else {
|
||||
$variables[$varName] = @($packageVersion)
|
||||
}
|
||||
}
|
||||
|
||||
if (!$msNetCoreAppPackageVersion) {
|
||||
Throw "$msNetCoreAppPackageName was not in $coreSetupVersions"
|
||||
}
|
||||
|
||||
$coreAppDownloadLink = "https://dotnet.myget.org/F/dotnet-core/api/v2/package/$msNetCoreAppPackageName/$msNetCoreAppPackageVersion"
|
||||
$netCoreAppNupkg = "$tempDir/microsoft.netcore.app.zip"
|
||||
Invoke-WebRequest -OutFile $netCoreAppNupkg -Uri $coreAppDownloadLink
|
||||
$expandedNetCoreApp = "$tempDir/microsoft.netcore.app/"
|
||||
Expand-Archive -Path $netCoreAppNupkg -DestinationPath $expandedNetCoreApp -Force
|
||||
$versionsTxt = "$expandedNetCoreApp/$msNetCoreAppPackageName.versions.txt"
|
||||
|
||||
$versionsCoreFxCommit = $null
|
||||
foreach ($line in Get-Content $versionsTxt) {
|
||||
if ($line.StartsWith("dotnet/versions/corefx")) {
|
||||
$versionsCoreFxCommit = $line.Split(' ')[1]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (!$versionsCoreFxCommit) {
|
||||
Throw "no 'dotnet/versions/corefx' in versions.txt of Microsoft.NETCore.App"
|
||||
}
|
||||
|
||||
$coreFxVersionsUrl = "$githubRaw/$versionsRepo/$versionsCoreFxCommit/build-info/$coreFxRepo/$versionsBranch/Latest_Packages.txt"
|
||||
$localCoreFxVersions = "$tempDir/$corefx.packages"
|
||||
Invoke-WebRequest -OutFile $localCoreFxVersions -Uri $coreFxVersionsUrl
|
||||
|
||||
foreach ($line in Get-Content $localCoreFxVersions) {
|
||||
$parts = $line.Split(' ')
|
||||
|
||||
$packageName = $parts[0]
|
||||
|
||||
$varName = "$packageName" + "PackageVersion"
|
||||
$varName = $varName.Replace('.', '')
|
||||
$packageVersion = $parts[1]
|
||||
if ($variables[$varName]) {
|
||||
if ($variables[$varName].Where( {$_ -eq $packageVersion}, 'First').Count -eq 0) {
|
||||
$variables[$varName] += $packageVersion
|
||||
}
|
||||
}
|
||||
else {
|
||||
$variables[$varName] = @($packageVersion)
|
||||
}
|
||||
}
|
||||
|
||||
$depsPath = Resolve-Path "$PSScriptRoot/../build/dependencies.props"
|
||||
Write-Host "Loading deps from $depsPath"
|
||||
[xml] $dependencies = LoadXml $depsPath
|
||||
|
||||
if (-not $NoCommit) {
|
||||
$baseBranch = "release/2.1"
|
||||
Invoke-Block { & git fetch origin }
|
||||
|
||||
$currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD }
|
||||
$destinationBranch = "dotnetbot/UpdateCoreFxDeps"
|
||||
|
||||
Invoke-Block { & git checkout -tb $destinationBranch "origin/$baseBranch" }
|
||||
}
|
||||
|
||||
try {
|
||||
$updatedVars = UpdateVersions $variables $dependencies $depsPath
|
||||
if (-not $NoCommit) {
|
||||
$body = CommitUpdatedVersions $updatedVars $dependencies $depsPath
|
||||
|
||||
if ($body) {
|
||||
CreatePR "aspnet" $GithubUsername $baseBranch $destinationBranch $body $GithubToken
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (-not $NoCommit) {
|
||||
Invoke-Block { & git checkout $currentBranch }
|
||||
}
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
#!/usr/bin/env pwsh
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Updates each submodule this repo builds to new dependencies.props.
|
||||
.PARAMETER Source
|
||||
The NuGet package source to find the lineup on.
|
||||
.PARAMETER LineupID
|
||||
The ID of the Lineup to determine which versions to use.
|
||||
.PARAMETER LineupVersion
|
||||
The version of the Lineup to be used.
|
||||
.PARAMETER NoPush
|
||||
Make commits without pusing.
|
||||
.PARAMETER GitAuthorName
|
||||
The author name to use in the commit message. (Optional)
|
||||
.PARAMETER GitAuthorEmail
|
||||
The author email to use in the commit message. (Optional)
|
||||
.PARAMETER Force
|
||||
Specified this to push commits without prompting.
|
||||
.PARAMETER GitCommitArgs
|
||||
Any remaining arguments are passed as arguments to 'git commit' actions in each repo.
|
||||
#>
|
||||
[cmdletbinding(SupportsShouldProcess = $true)]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Source,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$LineupID,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$LineupVersion,
|
||||
[switch]$NoPush,
|
||||
[string]$GitAuthorName = $null,
|
||||
[string]$GitAuthorEmail = $null,
|
||||
[switch]$Force,
|
||||
[string[]]$GitCommitArgs = @()
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2
|
||||
|
||||
Import-Module "$PSScriptRoot/common.psm1" -Scope Local -Force
|
||||
|
||||
$RepoRoot = Resolve-Path "$PSScriptRoot\.."
|
||||
$ModuleDirectory = Join-Path $RepoRoot "modules"
|
||||
|
||||
$gitConfigArgs = @()
|
||||
if ($GitAuthorName) {
|
||||
$gitConfigArgs += '-c', "user.name=$GitAuthorName"
|
||||
}
|
||||
|
||||
if ($GitAuthorEmail) {
|
||||
$gitConfigArgs += '-c', "user.email=$GitAuthorEmail"
|
||||
}
|
||||
|
||||
Push-Location $ModuleDirectory
|
||||
try {
|
||||
|
||||
$build_errors = @()
|
||||
$submodules = Get-Submodules $RepoRoot
|
||||
foreach ($submodule in $submodules) {
|
||||
Push-Location $submodule.path
|
||||
try {
|
||||
Invoke-Block { & git fetch }
|
||||
Invoke-Block { & git checkout origin/$($submodule.branch) }
|
||||
$depsFile = Join-Path (Join-Path $($submodule.path) "build") "dependencies.props"
|
||||
|
||||
if (!(Test-Path $depsFile)) {
|
||||
Write-Warning "No build\dependencies.props file exists for '$($submodule.module)'."
|
||||
continue
|
||||
}
|
||||
|
||||
$koreBuildLock = "korebuild-lock.txt"
|
||||
|
||||
$repoKoreBuildLock = (Join-Path $RepoRoot $koreBuildLock)
|
||||
$submoduleKoreBuildLock = (Join-Path $submodule.path $koreBuildLock)
|
||||
|
||||
Copy-Item $repoKoreBuildLock $submoduleKoreBuildLock -Force
|
||||
|
||||
Write-Verbose "About to update dependencies.props for $($submodule.module)"
|
||||
& .\run.ps1 upgrade deps --source $Source --id $LineupID --version $LineupVersion --deps-file $depsFile
|
||||
|
||||
Invoke-Block { & git @gitConfigArgs add $depsFile $koreBuildLock }
|
||||
|
||||
# If there were any changes test and push.
|
||||
& git diff --cached --quiet ./
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Invoke-Block { & git @gitConfigArgs commit --quiet -m "Update dependencies.props`n`n[auto-updated: dependencies]" @GitCommitArgs }
|
||||
|
||||
# Prepare this submodule for push
|
||||
$sshUrl = "git@github.com:aspnet/$($submodule.module)"
|
||||
Invoke-Block { & git remote set-url --push origin $sshUrl }
|
||||
|
||||
# Test the submodule
|
||||
try {
|
||||
Invoke-Block { & .\run.ps1 default-build /p:SkipTests=true }
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Error in $($submodule.module): $_"
|
||||
$build_errors += @{
|
||||
Repo = $submodule.module
|
||||
Message = $_
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
# Push the changes
|
||||
if (-not $NoPush -and ($Force -or ($PSCmdlet.ShouldContinue("Pushing updates to repos.", 'Push the changes to these repos?')))) {
|
||||
try {
|
||||
Invoke-Block { & git @gitConfigArgs push origin HEAD:$($submodule.branch)}
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Error in pushing $($submodule.module): $_"
|
||||
$build_errors += @{
|
||||
Repo = $submodule.module
|
||||
Message = $_
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "No changes in $($submodule.module)"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Error in $($submodule.module): $_"
|
||||
$build_errors += @{
|
||||
Repo = $submodule.module
|
||||
Message = $_
|
||||
}
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
if ($build_errors.Count -gt 0 ) {
|
||||
Write-Warning "The following repos failed:"
|
||||
foreach ($error in $build_errors) {
|
||||
Write-Warning " - $($error.Repo)"
|
||||
}
|
||||
throw "Failed to build"
|
||||
}
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
PyYAML==3.12
|
||||
termcolor==1.1.0
|
|
@ -1,100 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import collections
|
||||
import glob
|
||||
import yaml
|
||||
from os import path
|
||||
from termcolor import colored, cprint
|
||||
from yaml.constructor import Constructor
|
||||
|
||||
def dump_format(dump, tag, mapping, flow_style=None):
|
||||
"""
|
||||
Better output formatting for YAML dictionaries
|
||||
"""
|
||||
value = []
|
||||
node = yaml.MappingNode(tag, value, flow_style=flow_style)
|
||||
if dump.alias_key is not None:
|
||||
dump.represented_objects[dump.alias_key] = node
|
||||
best_style = True
|
||||
if hasattr(mapping, 'items'):
|
||||
mapping = mapping.items()
|
||||
for item_key, item_value in mapping:
|
||||
node_key = dump.represent_data(item_key)
|
||||
node_value = dump.represent_data(item_value)
|
||||
if not (isinstance(node_key, yaml.ScalarNode) and not node_key.style):
|
||||
best_style = False
|
||||
if not (isinstance(node_value, yaml.ScalarNode) and not node_value.style):
|
||||
best_style = False
|
||||
value.append((node_key, node_value))
|
||||
if flow_style is None:
|
||||
if dump.default_flow_style is not None:
|
||||
node.flow_style = dump.default_flow_style
|
||||
else:
|
||||
node.flow_style = best_style
|
||||
return node
|
||||
|
||||
|
||||
def add_bool_as_scalar(self, node):
|
||||
"""
|
||||
Don't auto-parse boolean values
|
||||
"""
|
||||
if node.value == 'true' or node.value == 'false' :
|
||||
return self.construct_yaml_bool(node)
|
||||
return self.construct_scalar(node)
|
||||
|
||||
_mapping_tag = yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG
|
||||
|
||||
def dict_representer(dumper, data):
|
||||
return dumper.represent_mapping(_mapping_tag, data.iteritems())
|
||||
|
||||
|
||||
def dict_constructor(loader, node):
|
||||
return collections.OrderedDict(loader.construct_pairs(node))
|
||||
|
||||
def update(pattern, updater):
|
||||
print('\n\n\n')
|
||||
cprint(pattern, 'magenta')
|
||||
|
||||
for f in glob.glob(path.join(repo_root, "modules", "*", pattern)):
|
||||
yml = path.join(repo_root, f)
|
||||
|
||||
if not path.exists(yml):
|
||||
cprint("File does not exist: {}".format(yml), 'red')
|
||||
continue
|
||||
|
||||
print("Updating {}".format(yml))
|
||||
document = yaml.load(open(yml, 'r'))
|
||||
document = updater(document)
|
||||
yml_file = open(yml, 'w')
|
||||
yml_file.write(yaml.safe_dump(document, default_flow_style=False, indent=2))
|
||||
yml_file.close()
|
||||
|
||||
#
|
||||
# Config yaml parser
|
||||
#
|
||||
|
||||
# Do not reorder keys in yaml file
|
||||
yaml.add_representer(collections.OrderedDict, dict_representer)
|
||||
yaml.add_constructor(_mapping_tag, dict_constructor)
|
||||
# Pretty print dictionaries
|
||||
yaml.SafeDumper.add_representer(collections.OrderedDict,
|
||||
lambda dumper, value: dump_format(dumper, u'tag:yaml.org,2002:map', value))
|
||||
# Don't parse booleans - treat them as scalars
|
||||
yaml.Loader.add_constructor(u'tag:yaml.org,2002:bool', add_bool_as_scalar)
|
||||
yaml.SafeLoader.add_constructor(u'tag:yaml.org,2002:bool', add_bool_as_scalar)
|
||||
|
||||
#
|
||||
# Main
|
||||
#
|
||||
|
||||
repo_root = path.dirname(path.dirname(path.abspath(__file__)))
|
||||
|
||||
def transform_yaml_doc(document):
|
||||
if not 'branches' in document:
|
||||
document['branches'] = {}
|
||||
document['branches']['only'] = [
|
||||
'dev', '/^release\/.*$/', '/^(.*\/)?ci-.*$/']
|
||||
return document
|
||||
|
||||
update(".travis.yml", transform_yaml_doc)
|
||||
update(".appveyor.yml", transform_yaml_doc)
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -5,11 +5,6 @@
|
|||
<AssemblySigningCertName>Microsoft</AssemblySigningCertName>
|
||||
|
||||
<FunctionalTestsProject>$(RepositoryRoot)test\Microsoft.AspNetCore.AzureAppServices.FunctionalTests\Microsoft.AspNetCore.AzureAppServices.FunctionalTests.csproj</FunctionalTestsProject>
|
||||
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -16,13 +16,6 @@
|
|||
<ExcludeFromTest Include="$(RepositoryRoot)test\AspNetCoreModule.Test\*.csproj" Condition="'$(OS)' != 'Windows_NT'" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -5,12 +5,6 @@
|
|||
<ExcludeSolutions Include="$(RepositoryRoot)IdentityCore.sln" />
|
||||
<ExcludeSolutions Include="$(RepositoryRoot)Identity.Samples.sln" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -10,12 +10,6 @@
|
|||
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.Mvc.TestDiagnosticListener\*.csproj" />
|
||||
<ExcludeSolutions Include="$(RepositoryRoot)Mvc.*Fun.sln" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<Project>
|
||||
<Import Project="..\..\Directory.Build.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Ensure we are only putting packages in the package cache that are explicitly listed -->
|
||||
<PackageReference Remove="@(PackageReference)" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Don't restore from any fallback folder -->
|
||||
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<BuildVSIX Condition="'$(BuildVSIX)' ==''">true</BuildVSIX>
|
||||
<BuildVSIX Condition="'$(BuildVSIX)' ==''">false</BuildVSIX>
|
||||
<RestoreDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(RestoreDependsOn);RestoreVSIX</RestoreDependsOn>
|
||||
<PackageDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(PackageDependsOn);PackageVSIX</PackageDependsOn>
|
||||
<GetArtifactInfoDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(GetArtifactInfoDependsOn);GetVSIXArtifactInfo</GetArtifactInfoDependsOn>
|
||||
|
@ -18,7 +18,7 @@
|
|||
Condition="'$(OS)'=='Windows_NT'" />
|
||||
|
||||
<!-- This target is required so KoreBuild can generate a bill of materials with relevant information about the VSIX. -->
|
||||
<Target Name="GetVSIXArtifactInfo">
|
||||
<Target Name="GetVSIXArtifactInfo" Condition=" '$(BuildVSIX)' == 'true' ">
|
||||
<ItemGroup>
|
||||
|
||||
<ArtifactInfo Include="$(VSIXOutputPath)">
|
||||
|
|
|
@ -18,13 +18,6 @@
|
|||
<ExcludeSolutions Include="$(RepositoryRoot)Razor.Slim.sln" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
<ItemGroup>
|
||||
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.Owin.Security.Interop.Test\*.csproj" Condition="'$(OS)' != 'Windows_NT'" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
<ItemGroup>
|
||||
<ExcludeFromTest Include="$(RepositoryRoot)test\ServerComparison.TestSites\ServerComparison.TestSites.csproj" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
<ItemGroup>
|
||||
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.SignalR.Tests.Utils\*.csproj" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
|
|
|
@ -2656,12 +2656,14 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -2676,17 +2678,20 @@
|
|||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -2803,7 +2808,8 @@
|
|||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -2815,6 +2821,7 @@
|
|||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -2829,6 +2836,7 @@
|
|||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
@ -2836,12 +2844,14 @@
|
|||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -2860,6 +2870,7 @@
|
|||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -2940,7 +2951,8 @@
|
|||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -2952,6 +2964,7 @@
|
|||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -3073,6 +3086,7 @@
|
|||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@aspnet/signalr-protocol-msgpack",
|
||||
"version": "1.0.3-rtm-t000",
|
||||
"version": "1.0.4-rtm-t000",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@aspnet/signalr",
|
||||
"version": "1.0.3-rtm-t000",
|
||||
"version": "1.0.4-rtm-t000",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>2.1.0-rc1-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<Project>
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageVersion>$(VersionPrefix)-*</LineupPackageVersion>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче