mirror of
https://github.com/actions/runner.git
synced 2025-12-15 22:47:01 +00:00
move .sln file. (#238)
This commit is contained in:
@@ -3,23 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29411.138
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Common", "src\Runner.Common\Runner.Common.csproj", "{084289A3-CD7A-42E0-9219-4348B4B7E19B}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Common", "Runner.Common\Runner.Common.csproj", "{084289A3-CD7A-42E0-9219-4348B4B7E19B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Listener", "src\Runner.Listener\Runner.Listener.csproj", "{7D461AEE-BF2A-4855-BD96-56921160B36A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Listener", "Runner.Listener\Runner.Listener.csproj", "{7D461AEE-BF2A-4855-BD96-56921160B36A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.PluginHost", "src\Runner.PluginHost\Runner.PluginHost.csproj", "{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.PluginHost", "Runner.PluginHost\Runner.PluginHost.csproj", "{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Plugins", "src\Runner.Plugins\Runner.Plugins.csproj", "{C23AFD6F-4DCD-4243-BC61-865BE31B9168}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Plugins", "Runner.Plugins\Runner.Plugins.csproj", "{C23AFD6F-4DCD-4243-BC61-865BE31B9168}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Sdk", "src\Runner.Sdk\Runner.Sdk.csproj", "{D0484633-DA97-4C34-8E47-1DADE212A57A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Sdk", "Runner.Sdk\Runner.Sdk.csproj", "{D0484633-DA97-4C34-8E47-1DADE212A57A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunnerService", "src\Runner.Service\Windows\RunnerService.csproj", "{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunnerService", "Runner.Service\Windows\RunnerService.csproj", "{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Worker", "src\Runner.Worker\Runner.Worker.csproj", "{C2F5B9FA-2621-411F-8EB2-273ED276F503}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Worker", "Runner.Worker\Runner.Worker.csproj", "{C2F5B9FA-2621-411F-8EB2-273ED276F503}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sdk", "src\Sdk\Sdk.csproj", "{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sdk", "Sdk\Sdk.csproj", "{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "src\Test\Test.csproj", "{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "Test\Test.csproj", "{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -1,344 +0,0 @@
|
||||
namespace AsyncFixer
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Actions.Pipelines.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Actions.Pipelines.WebApi.Contracts
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Build.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions2
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions2.Sdk
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions2.Sdk.Functions
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions2.Sdk.Operators
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions2.Tokens
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Logging
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.ObjectTemplating
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.ObjectTemplating.Schema
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.ObjectTemplating.Tokens
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Pipelines
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Pipelines.ContextData
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Pipelines.Expressions
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Pipelines.ObjectTemplating
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.Pipelines.Validation
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.GraphProfile.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Account
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.ActivityStatistic
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Auditing
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.AzureFrontDoor
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.CentralizedFeature
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.ClientNotification
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Commerce
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Common
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Common.ClientStorage
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Common.Diagnostics
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Common.Internal
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Compliance
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.ContentSecurityPolicy
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.DelegatedAuthorization
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Directories.DirectoryService
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.FeatureAvailability
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.FileContainer
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.FileContainer.Client
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.FormInput
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.GitHubConnector
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Graph
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Graph.Client
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.GroupLicensingRule
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Health
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.HostAcquisition
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Identity
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Identity.Client
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Identity.Mru
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.IdentityPicker
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Invitation
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Licensing
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Location
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Location.Client
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.MarketingPreferences
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Notification
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.OAuth
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.OAuthWhitelist
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Operations
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Organization
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.PermissionLevel
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Profile
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Security
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.ServicePrincipal
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Servicing
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Settings
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.TokenAdmin.Client
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.TokenRevocation
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Tokens
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Tokens.TokenAdmin.Client
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.TokenSigningKeyLifecycle
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.UserMapping
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Users
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Exceptions
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Internal
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Jwt
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Location
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Patch
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Patch.Json
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Utilities
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Utilities.Internal
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebApi.Xml
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.WebPlatform
|
||||
{
|
||||
}
|
||||
|
||||
namespace GitHub.Services.Zeus
|
||||
{
|
||||
}
|
||||
|
||||
@@ -5,10 +5,8 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using GitHub.Services.Common;
|
||||
using GitHub.Services.Graph.Client;
|
||||
|
||||
namespace GitHub.Services.WebApi.Xml
|
||||
{
|
||||
|
||||
432
src/Sync-Sdk.ps1
432
src/Sync-Sdk.ps1
@@ -1,432 +0,0 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$runnerRepo = Read-Host -Prompt "actions/runner repository root"
|
||||
if (!(Test-Path -LiteralPath "$runnerRepo/src")) {
|
||||
Write-Error "$runnerRepo should contains a /src folder"
|
||||
return 1
|
||||
}
|
||||
|
||||
$gitHubSdkFolder = Join-Path -Path "$runnerRepo/src" -ChildPath "Sdk"
|
||||
|
||||
$vsoRepo = $PWD
|
||||
while ($true) {
|
||||
if (Test-Path -LiteralPath "$vsoRepo/init.cmd") {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
$vsoRepo = (Get-Item $vsoRepo).Parent.FullName
|
||||
}
|
||||
}
|
||||
|
||||
$targetFolders = @(
|
||||
# "Common"
|
||||
# "WebApi"
|
||||
# "AadAuthentication"
|
||||
# "DTContracts"
|
||||
# "DTGenerated"
|
||||
# "DTLogging"
|
||||
# "DTExpressions"
|
||||
# "DTExpressions2"
|
||||
# "DTObjectTemplating"
|
||||
# "DTPipelines"
|
||||
# "DTWebApi"
|
||||
# "Resources"
|
||||
# "BuildWebApi"
|
||||
# "CoreWebApi"
|
||||
# "ArtifactWebApi"
|
||||
# "ArtifactContentTelemetry"
|
||||
# "ArtifactContent"
|
||||
# "BlobStoreWebApi"
|
||||
# "BlobStoreCommonTelemetry"
|
||||
# "BlobStoreCommon"
|
||||
)
|
||||
|
||||
$sourceFolders = @{
|
||||
# "Vssf\Client\Common" = "Common";
|
||||
# "Vssf\Client\WebApi" = "WebApi";
|
||||
# "DistributedTask\Shared\Common\Contracts" = "DTContracts";
|
||||
# "DistributedTask\Client\WebApi\Generated" = "DTGenerated";
|
||||
# "DistributedTask\Client\WebApi\Logging" = "DTLogging";
|
||||
# "DistributedTask\Client\WebApi\Expressions" = "DTExpressions";
|
||||
# "Actions\Runtime\Client\WebApi\Expressions2" = "DTExpressions2";
|
||||
# "Actions\Runtime\Client\WebApi\ObjectTemplating" = "DTObjectTemplating";
|
||||
# "Actions\Runtime\Client\WebApi\Pipelines" = "DTPipelines";
|
||||
# "DistributedTask\Client\WebApi\WebApi" = "DTWebApi";
|
||||
# "..\obj\Debug.AnyCPU\Vssf.Client\MS.VS.Services.Common\EmbeddedVersionInfo.cs" = "Common\EmbeddedVersionInfo.cs";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\VssAadToken.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\VssAadTokenProvider.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\VssAadCredential.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\VssAadSettings.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\VssFederatedCredential.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\VssFederatedToken.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\VssFederatedTokenProvider.cs" = "AadAuthentication";
|
||||
# "Vssf\InteractiveClient\Client\Authentication\Utility\CookieUtility.cs" = "AadAuthentication";
|
||||
# "Actions\Runtime\Client\WebApi\Pipelines\ObjectTemplating\workflow-v1.0.json" = "DTPipelines";
|
||||
# "Tfs\Client\Build2\Api" = "BuildWebApi";
|
||||
# "Tfs\Client\Core" = "CoreWebApi";
|
||||
# "ArtifactServices\Client\WebApi" = "ArtifactWebApi";
|
||||
# "ArtifactServices\Shared\Content.Common.Telemetry" = "ArtifactContentTelemetry";
|
||||
# "ArtifactServices\Shared\Content.Common" = "ArtifactContent";
|
||||
# "BlobStore\Client\WebApi" = "BlobStoreWebApi";
|
||||
# "ArtifactServices\Shared\BlobStore.Common.Telemetry" = "BlobStoreCommonTelemetry";
|
||||
# "ArtifactServices\Shared\BlobStore.Common" = "BlobStoreCommon";
|
||||
}
|
||||
|
||||
$extraFiles = @(
|
||||
# "BlobStoreCommon\BlobStore.Common\AzureStorageOperationTraceAdapter.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\BlobIdentifierHelperExtensions.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\BlobIdentifierHexConverter.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\EdgeCacheUrlBuilder.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\Exceptions.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\IDownloader.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\InternalsVisibleTo.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\IUrlSigner.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\ManagedParallelBlobDownloader.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\NullableExtensions.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\ObjectExtensions.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\InstrumentationManifest.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\InstrumentationManifestException.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\IPerformanceDataFacade.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\ManifestCounters.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\NoopPerfCounter.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\NoopPerformanceDataFacade.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\PerfCounter.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\PerfCounterSet.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\PerfCounters\PerformanceDataFacade.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\ReceiptSecretConstants.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\SecurityDefinitions.cs"
|
||||
# "BlobStoreCommon\BlobStore.Common\VsoHashAlgorithm.cs"
|
||||
# "BlobStoreCommonTelemetry\BlobStore.Common.Telemetry\InternalsVisibleTo.cs"
|
||||
# "ArtifactContentTelemetry\Content.Common.Telemetry\InternalsVisibleTo.cs"
|
||||
# "ArtifactContentTelemetry\Content.Common.Telemetry\Telemetry\NoopClientTelemetry.cs"
|
||||
# "ArtifactContentTelemetry\Content.Common.Telemetry\Telemetry\TelemetryPlatformSpecificNetFramework.cs"
|
||||
# "ArtifactContentTelemetry\Content.Common.Telemetry\Telemetry\TelemetryEnvironmentHelper.cs"
|
||||
# "ArtifactContent\Content.Common\AsyncEnumerator\AsyncEnumeratorExceptionWrapper.cs"
|
||||
# "ArtifactContent\Content.Common\AsyncEnumerator\IEnumeratorExceptionMapper.cs"
|
||||
# "ArtifactContent\Content.Common\AsyncEnumerator\AsyncEnumeratorWithCursor.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\AadAcquireTokenException.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\AadErrorHandlingPolicy.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\CredentialProvider\CredentialProviderException.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\CredentialProvider\CredentialProviderLoader.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\CredentialProvider\CredentialProviderManager.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\CredentialProvider\CredentialResponse.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\CredentialProvider\ICredentialProvider.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\CredentialProvider\PluginCredentialProvider.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\LocalTokenCacheArgs.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\TestableAuthenticationContext.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\VsoAadConstants.cs"
|
||||
# "ArtifactContent\Content.Common\Authentication\VsoCredentialHelper.cs"
|
||||
# "ArtifactContent\Content.Common\AutoKillProcessHandle.cs"
|
||||
# "ArtifactContent\Content.Common\ConcurrencyConsolidator.cs"
|
||||
# "ArtifactContent\Content.Common\EnumUtilities.cs"
|
||||
# "ArtifactContent\Content.Common\EquatableTuple.cs"
|
||||
# "ArtifactContent\Content.Common\FileVersionHelpers.cs"
|
||||
# "ArtifactContent\Content.Common\Histogram.cs"
|
||||
# "ArtifactContent\Content.Common\InternalsVisibleTo.cs"
|
||||
# "ArtifactContent\Content.Common\InUseDetection.cs"
|
||||
# "ArtifactContent\Content.Common\IteratorPartition.cs"
|
||||
# "ArtifactContent\Content.Common\Json\ByteArrayAsBase64JsonConvertor.cs"
|
||||
# "ArtifactContent\Content.Common\Json\ByteArrayAsHexJsonConvertor.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonEnumerator.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonNormalizer.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonProperty.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonStream.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonWrite.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonWriterStream.cs"
|
||||
# "ArtifactContent\Content.Common\Json\JsonWrites.cs"
|
||||
# "ArtifactContent\Content.Common\Json\ULongJsonConverter.cs"
|
||||
# "ArtifactContent\Content.Common\Kvp.cs"
|
||||
# "ArtifactContent\Content.Common\Operations\SecureStringConverter.cs"
|
||||
# "ArtifactContent\Content.Common\PagedEnumerator.cs"
|
||||
# "ArtifactContent\Content.Common\PerformanceInfo.cs"
|
||||
# "ArtifactContent\Content.Common\ReaderWriterLockSlimExtensions.cs"
|
||||
# "ArtifactContent\Content.Common\ReadOnlySet.cs"
|
||||
# "ArtifactContent\Content.Common\RetrievalOptions.cs"
|
||||
# "ArtifactContent\Content.Common\ServiceInstanceTypes.cs"
|
||||
# "ArtifactContent\Content.Common\ServicePointHelper.cs"
|
||||
# "ArtifactContent\Content.Common\ShardableLocator.cs"
|
||||
# "ArtifactContent\Content.Common\StringExtensions.cs"
|
||||
# "ArtifactContent\Content.Common\ThreadLocalRandom.cs"
|
||||
# "ArtifactContent\Content.Common\ThreadPoolHelper.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\AppTraceListener.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\ArtifactServicesTraceSource.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\ConsoleMessageUtil.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\ConsoleTraceListener.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\FileTraceListener.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\InMemoryLog.cs"
|
||||
# "ArtifactContent\Content.Common\Tracing\InMemoryTraceListener.cs"
|
||||
# "Common\Common\CommandLine\Argument.cs"
|
||||
# "Common\Common\CommandLine\AttributeBasedOperationModeHandlerFactory.cs"
|
||||
# "Common\Common\CommandLine\AttributeBasedOptionParserAdapter.cs"
|
||||
# "Common\Common\CommandLine\BasicParser.cs"
|
||||
# "Common\Common\CommandLine\CommandLineLexer.cs"
|
||||
# "Common\Common\CommandLine\Enumerations.cs"
|
||||
# "Common\Common\CommandLine\Exceptions.cs"
|
||||
# "Common\Common\CommandLine\Extensions.cs"
|
||||
# "Common\Common\CommandLine\IEnumerable.cs"
|
||||
# "Common\Common\CommandLine\OperationHandler.cs"
|
||||
# "Common\Common\CommandLine\OperationHandlerFactory.cs"
|
||||
# "Common\Common\CommandLine\OperationModeAttribute.cs"
|
||||
# "Common\Common\CommandLine\Option.cs"
|
||||
# "Common\Common\CommandLine\OptionAttribute.cs"
|
||||
# "Common\Common\CommandLine\OptionParser.cs"
|
||||
# "Common\Common\CommandLine\OptionReader.cs"
|
||||
# "Common\Common\CommandLine\ResponseFileOptionReader.cs"
|
||||
# "Common\Common\CommandLine\Validation\DefaultValidation.cs"
|
||||
# "Common\Common\CommandLine\Validation\IOptionValidation.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionExistsFilter.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionMustExist.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionRequiresSpecificValue.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionsAreMutuallyExclusive.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionsAreMutuallyInclusive.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionValidation.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionValidationFilter.cs"
|
||||
# "Common\Common\CommandLine\Validation\OptionValueFilter.cs"
|
||||
# "Common\Common\CommandLine\ValueConverters\CsvCollectionConverter.cs"
|
||||
# "Common\Common\CommandLine\ValueConverters\EnumConverter.cs"
|
||||
# "Common\Common\CommandLine\ValueConverters\IValueConvertible.cs"
|
||||
# "Common\Common\CommandLine\ValueConverters\UriConverter.cs"
|
||||
# "Common\Common\CommandLine\ValueConverters\ValueConverter.cs"
|
||||
# "Common\Common\ExternalProviders\IExternalProviderHttpRequester.cs"
|
||||
# "Common\Common\Performance\PerformanceNativeMethods.cs"
|
||||
# "Common\Common\TokenStorage\RegistryToken.cs"
|
||||
# "Common\Common\TokenStorage\RegistryTokenStorage.cs"
|
||||
# "Common\Common\TokenStorage\RegistryTokenStorageHelper.cs"
|
||||
# "Common\Common\TokenStorage\VssTokenStorageFactory.cs"
|
||||
# "Common\Common\Utility\CredentialsCacheManager.cs"
|
||||
# "Common\Common\Utility\EncryptionUtility.cs"
|
||||
# "Common\Common\Utility\EnumerableUtility.cs"
|
||||
# "Common\Common\Utility\EnvironmentWrapper.cs"
|
||||
# "Common\Common\Utility\ExceptionExtentions.cs"
|
||||
# "Common\Common\Utility\NativeMethods.cs"
|
||||
# "Common\Common\Utility\OSDetails.cs"
|
||||
# "Common\Common\Utility\DateTimeUtility.cs"
|
||||
# "Common\Common\Utility\PasswordUtility.cs"
|
||||
# "Common\Common\Utility\RegistryHelper.cs"
|
||||
# "Common\Common\Utility\SerializationHelper.cs"
|
||||
# "Common\Common\Utility\Csv\CsvException.cs"
|
||||
# "Common\Common\Utility\Csv\CsvConfiguration.cs"
|
||||
# "Common\Common\Utility\Csv\CsvWriter.cs"
|
||||
# "Common\Common\VssEnvironment.cs"
|
||||
# "WebApi\WebApi\AssemblyAttributes.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\ExpiringToken.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\Comparers\ExternalGitIssueComparer.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\ExternalGitExtensions.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\Comparers\ExternalGitPullRequestComparer.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\Comparers\ExternalGitCommitComparer.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\ExternalGitIssueEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\Comparers\ExternalGitRepoComparer.cs"
|
||||
# "WebApi\WebApi\Contracts\ExternalEvent\ExternalGitCommitCommentEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\PermissionLevel\Client\PagedPermissionLevelAssignment.cs"
|
||||
# "WebApi\WebApi\Contracts\PermissionLevel\Client\PermissionLevelAssignment.cs"
|
||||
# "WebApi\WebApi\Contracts\PermissionLevel\Enumerations.cs"
|
||||
# "WebApi\WebApi\Contracts\PermissionLevel\Client\PermissionLevelDefinition.cs"
|
||||
# "WebApi\WebApi\Contracts\Tokens\PATAddedEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\Tokens\SshKeyAddedEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\Tokens\ExpiringTokenEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\PATAddedEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\SshKeyAddedEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\ExpiringTokenEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\DelegatedAuthMigrationStatus.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\DelegatedAuthorizationMigrationBase.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedAuthorizationAccessKeyPublicDataMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedAuthorizationAccessMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedAuthorizationMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedAuthorizationAccessKeyMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedAuthorizationRegistrationMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedAuthorizationRegistrationRedirectLocationMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\DelegatedAuthorization\Migration\TokenDelegatedHostAuthorizationMigration.cs"
|
||||
# "WebApi\WebApi\Contracts\OAuthWhitelist\OAuthWhitelistEntry.cs"
|
||||
# "WebApi\WebApi\Contracts\TokenAdmin\PatRevokedEvent.cs"
|
||||
# "WebApi\WebApi\Contracts\TokenAdmin\TokenAdministrationRevocation.cs"
|
||||
# "WebApi\WebApi\Contracts\TokenAdmin\TokenAdminPagedSessionTokens.cs"
|
||||
# "WebApi\WebApi\Contracts\TokenAdmin\TokenAdminRevocation.cs"
|
||||
# "WebApi\WebApi\Contracts\TokenAdmin\TokenAdminRevocationRule.cs"
|
||||
# "WebApi\WebApi\Exceptions\AuditLogExceptions.cs"
|
||||
# "WebApi\WebApi\Exceptions\AadExceptions.cs"
|
||||
# "WebApi\WebApi\Exceptions\PermissionLevelExceptions.cs"
|
||||
# "WebApi\WebApi\HttpClients\CsmResourceProviderHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\CsmResourceProviderHttpClientBase.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\OAuthWhitelistHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\TokenAdminHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\TokenAdministrationHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\TokenExpirationHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\TokenMigrationHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\Generated\PermissionLevelHttpClient.cs"
|
||||
# "WebApi\WebApi\HttpClients\CommerceHostHelperHttpClient.cs"
|
||||
# "WebApi\WebApi\Utilities\DelegatedAuthComparers.cs"
|
||||
# "WebApi\WebApi\Utilities\HttpHeadersExtensions.cs"
|
||||
# "WebApi\WebApi\VssClientCertificateManager.cs"
|
||||
# "WebApi\WebApi\VssClientEnvironment.cs"
|
||||
# "WebApi\WebApi\VssSoapMediaTypeFormatter.cs"
|
||||
)
|
||||
|
||||
$resourceFiles = @{
|
||||
# "ExpressionResources" = "DistributedTask\Client\WebApi\Expressions\ExpressionResources.resx";
|
||||
# "PipelineStrings" = "DistributedTask\Client\WebApi\Pipelines\PipelineStrings.resx";
|
||||
# "CommonResources" = "Vssf\Client\Common\Resources.resx";
|
||||
# "IdentityResources" = "Vssf\Client\WebApi\Resources\IdentityResources.resx";
|
||||
# "JwtResources" = "Vssf\Client\WebApi\Resources\JwtResources.resx";
|
||||
# "WebApiResources" = "Vssf\Client\WebApi\Resources\WebApiResources.resx";
|
||||
# "DataImportResources" = "Vssf\Client\WebApi\Resources\DataImportResources.resx";
|
||||
# "PatchResources" = "Vssf\Client\WebApi\Resources\PatchResources.resx";
|
||||
# "AccountResources" = "Vssf\Client\WebApi\Resources\AccountResources.resx";
|
||||
# "TemplateStrings" = "DistributedTask\Client\WebApi\ObjectTemplating\TemplateStrings.resx";
|
||||
# "GraphResources" = "Vssf\Client\WebApi\Resources\GraphResources.resx";
|
||||
# "FileContainerResources" = "Vssf\Client\WebApi\Resources\FileContainerResources.resx";
|
||||
# "LocationResources" = "Vssf\Client\WebApi\Resources\LocationResources.resx";
|
||||
# "CommerceResources" = "Vssf\Client\WebApi\Resources\CommerceResources.resx";
|
||||
# "SecurityResources" = "Vssf\Client\WebApi\Resources\SecurityResources.resx";
|
||||
# "WebPlatformResources" = "Vssf\Client\WebApi\Resources\WebPlatformResources.resx";
|
||||
# "ZeusWebApiResources" = "Vssf\Client\WebApi\Resources\ZeusWebApiResources.resx";
|
||||
# "NameResolutionResources" = "Vssf\Client\WebApi\Resources\NameResolutionResources.resx";
|
||||
# "PartitioningResources" = "Vssf\Client\WebApi\Resources\PartitioningResources.resx";
|
||||
# "WebApiResources" = "Tfs\Client\Core\Resources\WebApiResources.resx";
|
||||
# "BlobStoreResources" = "BlobStore\Client\WebApi\Resources.resx"
|
||||
# "ContentResources" = "ArtifactServices\Shared\Content.Common\Resources.resx"
|
||||
# "BlobStoreCommonResources" = "ArtifactServices\Shared\BlobStore.Common\Resources.resx"
|
||||
}
|
||||
|
||||
$resourceNamespace = @{
|
||||
# "ExpressionResources" = "Microsoft.TeamFoundation.DistributedTask.Expressions";
|
||||
# "PipelineStrings" = "Microsoft.TeamFoundation.DistributedTask.Pipelines";
|
||||
# "CommonResources" = "Microsoft.VisualStudio.Services.Common.Internal";
|
||||
# "IdentityResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "JwtResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "WebApiResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "DataImportResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "PatchResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "AccountResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "TemplateStrings" = "Microsoft.TeamFoundation.DistributedTask.ObjectTemplating";
|
||||
# "GraphResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "FileContainerResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "LocationResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "CommerceResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "SecurityResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "WebPlatformResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "ZeusWebApiResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "NameResolutionResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "PartitioningResources" = "Microsoft.VisualStudio.Services.WebApi";
|
||||
# "WebApiResources" = "Microsoft.TeamFoundation.Core.WebApi";
|
||||
# "ContentResources" = "Microsoft.VisualStudio.Services.Content.Common";
|
||||
# "BlobStoreCommonResources" = "Microsoft.VisualStudio.Services.BlobStore.Common";
|
||||
# "BlobStoreResources" = "Microsoft.VisualStudio.Services.BlobStore.WebApi";
|
||||
}
|
||||
|
||||
foreach ($folder in $targetFolders) {
|
||||
Write-Host "Recreate $gitHubSdkFolder\$folder"
|
||||
|
||||
if (Test-Path -LiteralPath "$gitHubSdkFolder\$folder") {
|
||||
Remove-Item -LiteralPath "$gitHubSdkFolder\$folder" -Force -Recurse
|
||||
}
|
||||
New-Item -Path $gitHubSdkFolder -Name $folder -ItemType "directory" -Force
|
||||
}
|
||||
|
||||
foreach ($sourceFolder in $sourceFolders.Keys) {
|
||||
$copySource = Join-Path -Path $vsoRepo -ChildPath $sourceFolder
|
||||
$copyDest = Join-Path -Path $gitHubSdkFolder -ChildPath $sourceFolders[$sourceFolder]
|
||||
|
||||
Write-Host "Copy $copySource to $copyDest"
|
||||
|
||||
Copy-Item -Path $copySource -Destination $copyDest -Filter "*.cs" -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Host "Delete extra none NetStandard files"
|
||||
foreach ($extraFile in $extraFiles) {
|
||||
Remove-Item -LiteralPath "$gitHubSdkFolder\$extraFile" -Force
|
||||
}
|
||||
|
||||
Write-Host "Generate C# file for resx files"
|
||||
foreach ($resourceFile in $resourceFiles.Keys) {
|
||||
Write-Host "Generate file for $resourceFile"
|
||||
$stringBuilder = New-Object System.Text.StringBuilder
|
||||
$file = $resourceFiles[$resourceFile]
|
||||
$xml = [xml](Get-Content -LiteralPath "$vsoRepo\$file")
|
||||
$null = $stringBuilder.AppendLine('using System.Globalization;')
|
||||
$null = $stringBuilder.AppendLine('')
|
||||
$namespace = $resourceNamespace[$resourceFile]
|
||||
$null = $stringBuilder.AppendLine("namespace $namespace")
|
||||
$null = $stringBuilder.AppendLine('{')
|
||||
$null = $stringBuilder.AppendLine(" public static class $resourceFile")
|
||||
$null = $stringBuilder.AppendLine(' {')
|
||||
foreach ($data in $xml.root.data) {
|
||||
$i = 0
|
||||
$args = ""
|
||||
$inputs = ""
|
||||
while ($true) {
|
||||
if ($data.value.Contains("{$i}") -or $data.value.Contains("{$i" + ":")) {
|
||||
if ($i -eq 0) {
|
||||
$args = "object arg$i"
|
||||
$inputs = "arg$i"
|
||||
}
|
||||
else {
|
||||
$args = $args + ", " + "object arg$i"
|
||||
$inputs = $inputs + ", " + "arg$i"
|
||||
}
|
||||
$i++
|
||||
}
|
||||
else {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
$null = $stringBuilder.AppendLine("")
|
||||
$null = $stringBuilder.AppendLine(" public static string $($data.name)($($args))")
|
||||
$null = $stringBuilder.AppendLine(" {")
|
||||
$null = $stringBuilder.AppendLine(@"
|
||||
const string Format = @"$($data.value.Replace('"', '""'))";
|
||||
"@)
|
||||
if ($i -eq 0) {
|
||||
$null = $stringBuilder.AppendLine(" return Format;")
|
||||
}
|
||||
else {
|
||||
$null = $stringBuilder.AppendLine(" return string.Format(CultureInfo.CurrentCulture, Format, $inputs);")
|
||||
}
|
||||
$null = $stringBuilder.AppendLine(" }")
|
||||
}
|
||||
|
||||
$null = $stringBuilder.AppendLine(" }")
|
||||
$null = $stringBuilder.AppendLine("}")
|
||||
|
||||
# Write Resources.g.cs.
|
||||
$genResourceFile = Join-Path -Path $gitHubSdkFolder -ChildPath "Resources\$resourceFile.g.cs"
|
||||
[System.IO.File]::WriteAllText($genResourceFile, ($stringBuilder.ToString()), ([System.Text.Encoding]::UTF8))
|
||||
}
|
||||
|
||||
# Print out all namespaces
|
||||
Write-Host "Rename namespaces:"
|
||||
$namespaces = New-Object 'System.Collections.Generic.HashSet[string]'
|
||||
$sourceFiles = Get-ChildItem -LiteralPath $gitHubSdkFolder -Filter "*.cs" -Recurse -Force -File
|
||||
foreach ($file in $sourceFiles) {
|
||||
foreach ($line in Get-Content $file.FullName) {
|
||||
if ($line.StartsWith("namespace ")) {
|
||||
$namespace = $line.Substring("namespace ".Length)
|
||||
if ($namespaces.Add($namespace)) {
|
||||
Write-Host $namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Rename all namespaces to GitHub
|
||||
$allSourceFiles = Get-ChildItem -LiteralPath $gitHubSdkFolder -Filter "*.cs" -Recurse -Force -File
|
||||
foreach ($file in $allSourceFiles) {
|
||||
$stringBuilder = New-Object System.Text.StringBuilder
|
||||
foreach ($line in Get-Content $file.FullName) {
|
||||
if ($line.Contains("Microsoft.VisualStudio")) {
|
||||
$line = $line.Replace("Microsoft.VisualStudio", "GitHub");
|
||||
}
|
||||
elseif ($line.Contains("Microsoft.Azure.DevOps")) {
|
||||
$line = $line.Replace("Microsoft.Azure.DevOps", "GitHub");
|
||||
}
|
||||
elseif ($line.Contains("Microsoft.TeamFoundation")) {
|
||||
$line = $line.Replace("Microsoft.TeamFoundation", "GitHub");
|
||||
}
|
||||
|
||||
$null = $stringBuilder.AppendLine($line)
|
||||
}
|
||||
|
||||
[System.IO.File]::WriteAllText($file.FullName, ($stringBuilder.ToString()), ([System.Text.Encoding]::UTF8))
|
||||
}
|
||||
|
||||
Write-Host "Done"
|
||||
@@ -1,99 +0,0 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Push-Location -Path .\Sdk
|
||||
try
|
||||
{
|
||||
# Generate Namespaces.cs
|
||||
Write-Host 'Generating Namespaces.cs'
|
||||
Remove-Item -Path Sdk\Namespaces.cs -ErrorAction Ignore
|
||||
$namespaces = New-Object System.Collections.Generic.HashSet[string]
|
||||
$output = findstr /snir /c:"^namespace " Sdk\*.cs
|
||||
foreach ($outputLine in ($output.Trim().Replace("`r", "").Split("`n")))
|
||||
{
|
||||
$namespace = $outputLine.Trim().Split(':')[-1].Split(' ')[-1]
|
||||
$namespaces.Add($namespace) | Out-Null
|
||||
}
|
||||
|
||||
$namespaces = New-Object System.Collections.Generic.List[string]($namespaces)
|
||||
$namespaces.Sort()
|
||||
$content = New-Object System.Text.StringBuilder
|
||||
foreach ($namespace in $namespaces)
|
||||
{
|
||||
$content.AppendLine("namespace $namespace") | Out-Null
|
||||
$content.AppendLine("{") | Out-Null
|
||||
$content.AppendLine("}") | Out-Null
|
||||
$content.AppendLine("") | Out-Null
|
||||
}
|
||||
[System.IO.File]::WriteAllText("$pwd\Sdk\Namespaces.cs", $content.ToString(), (New-Object System.Text.UTF8Encoding($false)))
|
||||
|
||||
# Gather whitelist of files not to delete
|
||||
Write-Host 'Gathering whitelist of files not to delete'
|
||||
$whitelist = New-Object System.Collections.Generic.HashSet[string]
|
||||
$whitelist.Add(((Resolve-Path -Path Sdk\Namespaces.cs).Path)) | Out-Null
|
||||
foreach ($file in (Get-ChildItem -Path Sdk\DTExpressions -Recurse -Filter *.cs))
|
||||
{
|
||||
$whitelist.Add($file.FullName) | Out-Null
|
||||
}
|
||||
foreach ($file in (Get-ChildItem -Path Sdk\DTLogging -Recurse -Filter *.cs))
|
||||
{
|
||||
$whitelist.Add($file.FullName) | Out-Null
|
||||
}
|
||||
foreach ($file in (Get-ChildItem -Path Sdk\DTObjectTemplating -Recurse -Filter *.cs))
|
||||
{
|
||||
$whitelist.Add($file.FullName) | Out-Null
|
||||
}
|
||||
foreach ($file in (Get-ChildItem -Path Sdk\DTPipelines\Pipelines\ContextData -Recurse -Filter *.cs))
|
||||
{
|
||||
$whitelist.Add($file.FullName) | Out-Null
|
||||
}
|
||||
foreach ($file in (Get-ChildItem -Path Sdk\DTPipelines\Pipelines\ObjectTemplating -Recurse -Filter *.cs))
|
||||
{
|
||||
$whitelist.Add($file.FullName) | Out-Null
|
||||
}
|
||||
|
||||
# Gather candidate files to delete
|
||||
Write-Host 'Gathering candidate files to delete'
|
||||
$candidatePaths = New-Object System.Collections.Generic.List[string]
|
||||
$deletedPaths = New-Object System.Collections.Generic.List[string]
|
||||
foreach ($candidateFile in (Get-ChildItem -Path Sdk -Recurse -Filter *.cs))
|
||||
{
|
||||
if (!$whitelist.Contains($candidateFile.FullName) -and (($candidateFile.FullName.IndexOf('\obj\')) -le 0))
|
||||
{
|
||||
$candidatePaths.Add($candidateFile.FullName)
|
||||
}
|
||||
}
|
||||
|
||||
while ($true)
|
||||
{
|
||||
$found = $false
|
||||
for ($i = 0; $i -lt $candidatePaths.Count; )
|
||||
{
|
||||
$candidatePath = $candidatePaths[$i]
|
||||
Write-Host "Checking $candidatePath"
|
||||
Remove-Item -Path $candidatePath
|
||||
.\dev.cmd build
|
||||
if ($LASTEXITCODE -eq 0)
|
||||
{
|
||||
$deletedPaths.Add($candidatePath)
|
||||
$candidatePaths.RemoveAt($i)
|
||||
Write-Host "Successfully deleted $candidatePath"
|
||||
$found = $true
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "Undeleting $candidatePath"
|
||||
git checkout -- $candidatePath
|
||||
$i++
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
# Pop-Location
|
||||
}
|
||||
@@ -109,13 +109,13 @@ function heading()
|
||||
function build ()
|
||||
{
|
||||
heading "Building ..."
|
||||
dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" || failed build
|
||||
dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build
|
||||
}
|
||||
|
||||
function layout ()
|
||||
{
|
||||
heading "Create layout ..."
|
||||
dotnet msbuild -t:layout -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" || failed build
|
||||
dotnet msbuild -t:layout -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build
|
||||
|
||||
#change execution flag to allow running with sudo
|
||||
if [[ ("$CURRENT_PLATFORM" == "linux") || ("$CURRENT_PLATFORM" == "darwin") ]]; then
|
||||
@@ -139,7 +139,7 @@ function runtest ()
|
||||
|
||||
export GITHUB_RUNNER_SRC_DIR=${SCRIPT_DIR}
|
||||
|
||||
dotnet msbuild -t:test -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" || failed "failed tests"
|
||||
dotnet msbuild -t:test -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed "failed tests"
|
||||
}
|
||||
|
||||
function package ()
|
||||
|
||||
Reference in New Issue
Block a user