From cc9819ed93ff928085437c0c999cee45f6103e07 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Fri, 28 Apr 2017 15:45:29 -0700 Subject: [PATCH 1/2] Removing the code to generate the lzma archive and instead download it from the asp.net location. --- build/BundledRuntimes.props | 4 + build/DependencyVersions.props | 1 + build/compile/LzmaArchive.targets | 115 +---------------------- src/dotnet-archive/Program.cs | 96 ------------------- src/dotnet-archive/dotnet-archive.csproj | 20 ---- tools/Archiver/Archiver.csproj | 22 ----- 6 files changed, 9 insertions(+), 249 deletions(-) delete mode 100644 src/dotnet-archive/Program.cs delete mode 100644 src/dotnet-archive/dotnet-archive.csproj delete mode 100644 tools/Archiver/Archiver.csproj diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 6d3430d39..5388bba29 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -30,6 +30,10 @@ $(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive + + $(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeVersion) + + <_DownloadAndExtractItem Include="CombinedSharedHostAndFrameworkArchive" Condition="!Exists('$(CombinedSharedHostAndFrameworkArchive)')"> diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 64284b4d5..38c6ffb4c 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -17,6 +17,7 @@ 2.0.0-preview1-002101 2.0.0-preview1-002101 0.1.0-alpha-142 + 2.0.0-preview1-34 diff --git a/build/compile/LzmaArchive.targets b/build/compile/LzmaArchive.targets index ae7bf4646..8acf75bfc 100644 --- a/build/compile/LzmaArchive.targets +++ b/build/compile/LzmaArchive.targets @@ -2,127 +2,20 @@ - false - - <configuration> - <packageSources> - <add key="configurable.source" value="%CLI_LZMA_PACKAGE_SOURCE%" /> - </packageSources> - </configuration> - - - $(IntermediateDirectory)/NuGetPackagesArchiveProject - $(IntermediateDirectory)/NuGetPackagesArchiveFolder - $(NuGetPackagesArchiveProject)/Nuget.config - $(RepoRoot)/NuGet.Config - $(BaseOutputDirectory)/tools - $(ToolsOutputDirectory)/Archiver.dll $(SdkOutputDirectory)/nuGetPackagesArchive.lzma + nuGetPackagesArchive.notimestamp.lzma + $(IntermediateDirectory)/$(NugetPackagesArchiveName) + $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(NugetPackagesArchiveName) - - - - - - - - - - - $(NugetPackagesArchiveRelativeBlobUrl)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nuGetPackagesArchive.$(NuGetPackagesArchiveVersion).lzma - $(IntermediateDirectory)/$(NugetPackagesArchiveName) - $(Product)/NuGetPackagesArchives - $(DotnetBlobRootUrl)/$(NugetPackagesArchiveRelativeBlobUrl)/$(NugetPackagesArchiveName) - + diff --git a/src/dotnet-archive/Program.cs b/src/dotnet-archive/Program.cs deleted file mode 100644 index 3376bf47e..000000000 --- a/src/dotnet-archive/Program.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.DotNet.Cli.CommandLine; -//using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Archive; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; - -namespace Microsoft.DotNet.Tools.Archive -{ - - public partial class ArchiveCommand - { - public static int Main(string[] args) - { - //DebugHelper.HandleDebugSwitch(ref args); - - var app = new CommandLineApplication(); - app.Name = "archive"; - app.FullName = ".NET archiver"; - app.Description = "Archives and expands sets of files"; - app.HelpOption("-h|--help"); - - var extract = app.Option("-x|--extract ", "Directory to extract to", CommandOptionType.SingleValue); - var archiveFile = app.Option("-a|--archive ", "Archive to operate on", CommandOptionType.SingleValue); - var externals = app.Option("--external ...", "External files and directories to consider for extraction", CommandOptionType.MultipleValue); - var sources = app.Argument("...", "Files & directory to include in the archive", multipleValues:true); - - app.OnExecute(() => { - - if (extract.HasValue() && sources.Values.Any()) - { - Console.WriteLine("Extract '-x' can only be specified when no '' are specified to add to the archive."); - return 1; - } - else if (!extract.HasValue() && !sources.Values.Any()) - { - Console.WriteLine("Either extract '-x' or '' must be specified."); - return 1; - } - - if (!archiveFile.HasValue()) - { - Console.WriteLine("Archive '-a' must be specified."); - return 1; - } - - var progress = new ConsoleProgressReport(); - - var archive = new IndexedArchive(); - foreach (var external in externals.Values) - { - if (Directory.Exists(external)) - { - archive.AddExternalDirectory(external); - } - else - { - archive.AddExternalFile(external); - } - } - - if (sources.Values.Any()) - { - foreach(var source in sources.Values) - { - if (Directory.Exists(source)) - { - archive.AddDirectory(source, progress); - } - else - { - archive.AddFile(source, Path.GetFileName(source)); - } - } - - archive.Save(archiveFile.Value(), progress); - } - else // sources not specified, extract must have been specified - { - archive.Extract(archiveFile.Value(), extract.Value(), progress); - - } - - return 0; - }); - - return app.Execute(args); - } - } -} diff --git a/src/dotnet-archive/dotnet-archive.csproj b/src/dotnet-archive/dotnet-archive.csproj deleted file mode 100644 index a983cefce..000000000 --- a/src/dotnet-archive/dotnet-archive.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - - $(CliTargetFramework) - Exe - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/Archiver/Archiver.csproj b/tools/Archiver/Archiver.csproj deleted file mode 100644 index 2a63e855f..000000000 --- a/tools/Archiver/Archiver.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - - netcoreapp2.0 - Exe - $(CLI_SharedFrameworkVersion) - - - - - - - - - - - - - - - \ No newline at end of file From 416ea8166eba3cd8a3e25575fafcf25341c66019 Mon Sep 17 00:00:00 2001 From: Livar Date: Tue, 2 May 2017 12:03:52 -0700 Subject: [PATCH 2/2] Updating the aspnet runtime version to 56 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 38c6ffb4c..56ebfcf38 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -17,7 +17,7 @@ 2.0.0-preview1-002101 2.0.0-preview1-002101 0.1.0-alpha-142 - 2.0.0-preview1-34 + 2.0.0-preview1-56