From e894d7e60ef00b3b0cb40c85af8426bb4e6eec03 Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Wed, 22 Feb 2017 16:54:15 -0800 Subject: [PATCH] Refactor publish.target --- Microsoft.DotNet.Cli.sln | 2 ++ build/AzureInfo.props | 14 ++++++++ build/InstallerInfo.props | 10 ++++++ build/Publish.targets | 55 +++++++++++------------------ build/compile/LzmaArchive.targets | 3 +- build/package/Installer.DEB.targets | 6 ---- build/package/Installer.MSI.targets | 3 -- build/package/Installer.PKG.targets | 2 -- dir.props | 22 ++++++------ 9 files changed, 58 insertions(+), 59 deletions(-) create mode 100644 build/AzureInfo.props create mode 100644 build/InstallerInfo.props diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index e749dc055..e17169e87 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -24,6 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestPackages", "TestPackage EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4-BC0F-443B-8ADF-691321F10108}" ProjectSection(SolutionItems) = preProject + build\AzureInfo.props = build\AzureInfo.props build\Branding.props = build\Branding.props build\BranchInfo.props = build\BranchInfo.props build\BuildDefaults.props = build\BuildDefaults.props @@ -43,6 +44,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4 build\InitRepo.props = build\InitRepo.props build\InitRepo.targets = build\InitRepo.targets build\InputDirectories.props = build\InputDirectories.props + build\InstallerInfo.props = build\InstallerInfo.props build\OutputDirectories.props = build\OutputDirectories.props build\Package.targets = build\Package.targets build\Prepare.targets = build\Prepare.targets diff --git a/build/AzureInfo.props b/build/AzureInfo.props new file mode 100644 index 000000000..0e8cf5104 --- /dev/null +++ b/build/AzureInfo.props @@ -0,0 +1,14 @@ + + + Sdk + $(ARTIFACT_STORAGE_CONTAINER) + dotnet + $(ARTIFACT_STORAGE_KEY) + $(ARTIFACT_STORAGE_ACCOUNT) + dotnetcli + https://$(ArtifactCloudDropAccountName).blob.core.windows.net/$(ArtifactContainerName) + $(CHECKSUM_STORAGE_CONTAINER) + $(CHECKSUM_STORAGE_KEY) + $(CHECKSUM_STORAGE_ACCOUNT) + + diff --git a/build/InstallerInfo.props b/build/InstallerInfo.props new file mode 100644 index 000000000..86f658fb9 --- /dev/null +++ b/build/InstallerInfo.props @@ -0,0 +1,10 @@ + + + $(SdkVersion) + dotnet-dev-$(SdkDebianPackageVersion) + $(IntermediateDirectory)/debian/sdk + + $(PackagesDirectory) + $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) + + diff --git a/build/Publish.targets b/build/Publish.targets index 72811e068..cee075735 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -5,6 +5,25 @@ + + + + + + $(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension) + $(SdkDebianIntermediateDirectory)/package_upload.json + 1 + + + { + "name":"$(SdkDebianPackageName)", + "version":"$(NugetVersion)-$(DebianRevisionNumber)", + "repositoryId":"$(REPO_ID)", + "sourceUrl": "$(SdkDebianUploadUrl)" + } + + + - - - Sdk - $(ARTIFACT_STORAGE_CONTAINER) - dotnet - $(ARTIFACT_STORAGE_KEY) - $(ARTIFACT_STORAGE_ACCOUNT) - dotnetcli - https://$(ArtifactCloudDropAccountName).blob.core.windows.net/$(ArtifactContainerName) - $(CHECKSUM_STORAGE_CONTAINER) - $(CHECKSUM_STORAGE_KEY) - $(CHECKSUM_STORAGE_ACCOUNT) - - - @@ -59,24 +62,6 @@ - - - - - $(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension) - $(SdkDebianIntermediateDirectory)/package_upload.json - 1 - - - { - "name":"$(SdkDebianPackageName)", - "version":"$(NugetVersion)-$(DebianRevisionNumber)", - "repositoryId":"$(REPO_ID)", - "sourceUrl": "$(SdkDebianUploadUrl)" - } - - - diff --git a/build/compile/LzmaArchive.targets b/build/compile/LzmaArchive.targets index 7b51073ee..a70316354 100644 --- a/build/compile/LzmaArchive.targets +++ b/build/compile/LzmaArchive.targets @@ -27,7 +27,6 @@ @@ -108,7 +107,7 @@ + DependsOnTargets="Prepare"> diff --git a/build/package/Installer.DEB.targets b/build/package/Installer.DEB.targets index ca94cf99f..af2f25e47 100644 --- a/build/package/Installer.DEB.targets +++ b/build/package/Installer.DEB.targets @@ -33,8 +33,6 @@ - $(SdkVersion) - dotnet-dev-$(SdkDebianPackageVersion) $(SharedFrameworkVersion) dotnet-sharedframework-$(SharedFrameworkName)-$(SharedFxDebianPackageVersion) $(SharedFxDebianPackageName.ToLower()) @@ -65,10 +63,6 @@ - $(PackagesDirectory) - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) - - $(IntermediateDirectory)/debian/sdk $(SdkDebianIntermediateDirectory)/deb-tool-output $(SdkDebianIntermediateDirectory)/debian-testResults.xml diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index 583e1f240..af6c5e29b 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -12,15 +12,12 @@ - $(PackagesDirectory) - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe $(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1 $(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1 $(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1 - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension) $(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec $(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg diff --git a/build/package/Installer.PKG.targets b/build/package/Installer.PKG.targets index 22416f080..96873d6c6 100644 --- a/build/package/Installer.PKG.targets +++ b/build/package/Installer.PKG.targets @@ -2,10 +2,8 @@ - $(PackagesDirectory) $(IntermediateDirectory)/pkgs/$(SdkVersion) - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension) diff --git a/dir.props b/dir.props index 82eb03eb2..df1b68ae1 100644 --- a/dir.props +++ b/dir.props @@ -2,6 +2,15 @@ $(MSBuildThisFileDirectory) + + $(NUGET_PACKAGES) + $(RepoRoot)/.nuget/packages + + $(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll + + true + + netcoreapp2.0 @@ -23,17 +32,8 @@ - - - $(NUGET_PACKAGES) - $(RepoRoot)/.nuget/packages - - $(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll - - true - - netcoreapp2.0 - + +