85b2a129db
Conflicts: TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj build.proj build/Compile.targets build/Microsoft.DotNet.Cli.Compile.targets build/Microsoft.DotNet.Cli.DependencyVersions.props build/Microsoft.DotNet.Cli.Monikers.props build/Microsoft.DotNet.Cli.Prepare.targets build/package/Microsoft.DotNet.Cli.Nupkg.targets build/package/Nupkg.targets build/test/TestPackageProjects.targets build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs build_projects/dotnet-cli-build/GetCommitCount.cs build_projects/dotnet-cli-build/dotnet-cli-build.csproj build_projects/shared-build-targets-utils/Utils/BuildVersion.cs src/dotnet-archive/dotnet-archive.csproj src/tool_msbuild/tool_msbuild.csproj src/tool_nuget/tool_nuget.csproj test/ArgumentForwardingTests/ArgumentForwardingTests.csproj test/ArgumentsReflector/ArgumentsReflector.csproj test/EndToEnd/EndToEnd.csproj test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj test/binding-redirects.Tests/binding-redirects.Tests.csproj test/crossgen.Tests/crossgen.Tests.csproj test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj test/dotnet-build.Tests/dotnet-build.Tests.csproj test/dotnet-help.Tests/dotnet-help.Tests.csproj test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj test/dotnet-new.Tests/dotnet-new.Tests.csproj test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj test/dotnet-pack.Tests/dotnet-pack.Tests.csproj test/dotnet-publish.Tests/dotnet-publish.Tests.csproj test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj test/dotnet-restore.Tests/dotnet-restore.Tests.csproj test/dotnet-run.Tests/dotnet-run.Tests.csproj test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj test/dotnet-test.Tests/dotnet-test.Tests.csproj test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj test/dotnet.Tests/dotnet.Tests.csproj test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj tools/Archiver/Archiver.csproj
110 lines
No EOL
5.2 KiB
XML
110 lines
No EOL
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Import Project="$(MSBuildThisFileDirectory)/publish/FinishBuild.targets" />
|
|
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishContent.targets" />
|
|
<Import Project="$(MSBuildThisFileDirectory)/publish/Badge.targets" />
|
|
<Import Project="$(MSBuildThisFileDirectory)/publish/Checksum.targets" />
|
|
|
|
<!-- PUBLISH_TO_AZURE_BLOB env variable set by CI -->
|
|
<Target Name="Publish"
|
|
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' != '' "
|
|
DependsOnTargets="Init;
|
|
Package;
|
|
PublishArtifacts;
|
|
FinishBuild" />
|
|
|
|
<!-- UploadToAzure target comes from Build Tools -->
|
|
<Target Name="PublishArtifacts"
|
|
DependsOnTargets="SetupAzureBlobInformation;
|
|
GenerateVersionBadge;
|
|
GatherItemsForPattern;
|
|
GenerateChecksums;
|
|
UploadArtifactsToAzure;
|
|
UploadChecksumsToAzure;
|
|
PublishDebFilesToDebianRepo;
|
|
PublishCliVersionBadge" />
|
|
|
|
<Target Name="SetupAzureBlobInformation">
|
|
<PropertyGroup>
|
|
<Product>Sdk</Product>
|
|
<ArtifactContainerName>$(ARTIFACT_STORAGE_CONTAINER)</ArtifactContainerName>
|
|
<ArtifactContainerName Condition="'$(ArtifactContainerName)' == ''">dotnet</ArtifactContainerName>
|
|
<ArtifactCloudDropAccessToken>$(ARTIFACT_STORAGE_KEY)</ArtifactCloudDropAccessToken>
|
|
<ArtifactCloudDropAccountName>$(ARTIFACT_STORAGE_ACCOUNT)</ArtifactCloudDropAccountName>
|
|
<ArtifactCloudDropAccountName Condition="'$(ArtifactCloudDropAccountName)' == ''">dotnetcli</ArtifactCloudDropAccountName>
|
|
<DotnetBlobRootUrl>https://$(ArtifactCloudDropAccountName).blob.core.windows.net/$(ArtifactContainerName)</DotnetBlobRootUrl>
|
|
<ChecksumContainerName>$(CHECKSUM_STORAGE_CONTAINER)</ChecksumContainerName>
|
|
<ChecksumCloudDropAccessToken>$(CHECKSUM_STORAGE_KEY)</ChecksumCloudDropAccessToken>
|
|
<ChecksumCloudDropAccountName>$(CHECKSUM_STORAGE_ACCOUNT)</ChecksumCloudDropAccountName>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="GatherItemsForPattern">
|
|
<ItemGroup>
|
|
<ForPublishing Include="@(GeneratedInstallers)" />
|
|
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" />
|
|
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' " />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ForPublishing>
|
|
<RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
|
</ForPublishing>
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="PublishDebFilesToDebianRepo" Condition=" '$(OSName)' == 'ubuntu' AND '$(SkipPublishToDebianRepo)' != 'true' ">
|
|
<Error Condition="'$(REPO_ID)' == ''" Text="REPO_ID must be set as an environment variable for debian publishing." />
|
|
<Error Condition="'$(REPO_USER)' == ''" Text="REPO_USER must be set as an environment variable for debian publishing." />
|
|
<Error Condition="'$(REPO_PASS)' == ''" Text="REPO_PASS must be set as an environment variable for debian publishing." />
|
|
<Error Condition="'$(REPO_SERVER)' == ''" Text="REPO_SERVER must be set as an environment variable for debian publishing." />
|
|
|
|
<ItemGroup>
|
|
<SdkInstallerFileItemGroup Include="$(SdkInstallerFile)" />
|
|
</ItemGroup>
|
|
<PropertyGroup>
|
|
<SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension)</SdkDebianUploadUrl>
|
|
<DebianUploadJsonFile>$(SdkDebianIntermediateDirectory)/package_upload.json</DebianUploadJsonFile>
|
|
<DebianRevisionNumber>1</DebianRevisionNumber>
|
|
|
|
<DebianUploadJsonContent>
|
|
{
|
|
"name":"$(SdkDebianPackageName)",
|
|
"version":"$(NugetVersion)-$(DebianRevisionNumber)",
|
|
"repositoryId":"$(REPO_ID)",
|
|
"sourceUrl": "$(SdkDebianUploadUrl)"
|
|
}
|
|
</DebianUploadJsonContent>
|
|
</PropertyGroup>
|
|
|
|
<Delete Files="$(DebianUploadJsonFile)" />
|
|
<WriteLinesToFile File="$(DebianUploadJsonFile)" Lines="$(DebianUploadJsonContent)" />
|
|
|
|
<Exec Command="$(RepoRoot)/scripts/publish/repoapi_client.sh -addpkg $(DebianUploadJsonFile)" />
|
|
</Target>
|
|
|
|
<Target Name="PublishCliVersionBadge">
|
|
<ItemGroup>
|
|
<CliVersionBadgeToUpload Include="$(VersionBadge)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<CliVersionBadgeToUpload>
|
|
<RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
|
</CliVersionBadgeToUpload>
|
|
</ItemGroup>
|
|
|
|
<UploadToAzure
|
|
AccountKey="$(ArtifactCloudDropAccessToken)"
|
|
AccountName="$(ArtifactCloudDropAccountName)"
|
|
ContainerName="$(ArtifactContainerName)"
|
|
Items="@(CliVersionBadgeToUpload)"
|
|
Overwrite="$(OverwriteOnPublish)" />
|
|
|
|
<SetBlobPropertiesBasedOnFileType
|
|
AccountKey="$(ArtifactCloudDropAccessToken)"
|
|
AccountName="$(ArtifactCloudDropAccountName)"
|
|
ContainerName="$(ArtifactContainerName)"
|
|
Items="@(CliVersionBadgeToUpload)" />
|
|
</Target>
|
|
</Project> |