generated from dotnet/new-repo
-
Notifications
You must be signed in to change notification settings - Fork 65
New Microsoft.Deployment.DotNet.Releases package #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
812e612
New Microsoft.Deployment.DotNet.Releases package
joeloff 19634c6
Address code review feedback
joeloff 6b5d42b
Rename dotnetreleases to DotNetReleases
joeloff f409adf
Fix up doc comments, minor clean up
joeloff 623339a
Rename subset to 'dotnet_releases'
joeloff 9bf23c0
Clean up props file
joeloff 04d9960
Code cleanup
joeloff 4e17e38
PR cleanup and feedback
joeloff b0d51a0
Make GetReleasesAsync overload an instance method
joeloff 0730530
Replace var with explicit types
joeloff b4348b4
Make latest release data non-nullable, fix var usage
joeloff 6e405d3
Reacting to more feedback
joeloff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
173 changes: 173 additions & 0 deletions
173
src/Microsoft.Deployment.DotNet.Releases/Directory.Build.props
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,173 @@ | ||
| <Project> | ||
|
|
||
| <Import Project="..\..\Directory.Build.props" /> | ||
|
|
||
| <!-- | ||
| Before Microsoft.Common.targets, set the extensions path to match the restore dir as Arcade | ||
| sets it, so MSBuild packages with targets files will be found and imported. | ||
| --> | ||
| <PropertyGroup> | ||
| <MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <ArcadeSdkMSBuildProjectDir>$([System.IO.Path]::GetDirectoryName('$(ArcadeSdkBuildTasksAssembly)'))\..\</ArcadeSdkMSBuildProjectDir> | ||
| <ArcadeSdkSignProject>$(ArcadeSdkMSBuildProjectDir)Sign.proj</ArcadeSdkSignProject> | ||
|
|
||
| <!-- Clear AssemblyVersion as we need to align with the NuGet conventions, when empty arcade will do that for us. --> | ||
| <AssemblyVersion /> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'"> | ||
| <!-- SDK-based projects' Platform should default to AnyCPU, not $(TargetArchitecture) like Directory.Build.props sets. --> | ||
| <Platform>AnyCPU</Platform> | ||
| <UsingNETSdkCompiler>true</UsingNETSdkCompiler> | ||
| <DisableBuildToolsRoslynVersion>true</DisableBuildToolsRoslynVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <SigningToolsDir>$(InstallerProjectRoot)signing\</SigningToolsDir> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Platform detection --> | ||
| <PropertyGroup> | ||
| <RunningOnUnix Condition="'$(OS)'!='Windows_NT'">true</RunningOnUnix> | ||
| <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</TargetArchitecture> | ||
| <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> | ||
| <Platform Condition="'$(Platform)'==''">$(TargetArchitecture)</Platform> | ||
| <TargetOS Condition="'$(TargetOS)' == 'Linux'">Unix</TargetOS> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(DisableSourceLink)' == 'true'"> | ||
| <EnableSourceLink>false</EnableSourceLink> | ||
| <EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries> | ||
| <DeterministicSourcePaths>false</DeterministicSourcePaths> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Set up Default symbol and optimization for Configuration --> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Debug'"> | ||
| <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> | ||
| <Optimize Condition="'$(Optimize)' == ''">false</Optimize> | ||
| <DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(Configuration)' == 'Release'"> | ||
| <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> | ||
| <Optimize Condition="'$(Optimize)' == ''">true</Optimize> | ||
| <DefineConstants>$(DefineConstants),TRACE</DefineConstants> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(OutputRid)' == '' and '$(HostMachineRid)' != ''"> | ||
| <OutputRid>$(HostMachineRid.Remove($(HostMachineRid.LastIndexOf('-'))))-$(TargetArchitecture)</OutputRid> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Portable --> | ||
| <PropertyGroup Condition="'$(PortableBuild)' == 'true'"> | ||
| <OutputRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(TargetArchitecture)</OutputRid> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <TestTargetRid Condition="'$(TestTargetRid)' == ''">$(OutputRid)</TestTargetRid> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Produce assets into the specified blob feed. --> | ||
| <PropertyGroup Condition="'$(DotNetOutputBlobFeedDir)' != ''"> | ||
| <AssetOutputPath>$(DotNetOutputBlobFeedDir)assets/</AssetOutputPath> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Set up the default output and intermediate paths --> | ||
| <PropertyGroup> | ||
| <OSPlatformConfig>$(OutputRid).$(Configuration)</OSPlatformConfig> | ||
|
|
||
| <BaseOutputRootPath>$(ArtifactsBinDir)$(OSPlatformConfig)\</BaseOutputRootPath> | ||
|
|
||
| <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(ArtifactsObjDir)$(OSPlatformConfig)\</IntermediateOutputRootPath> | ||
|
|
||
| <PackagesBasePath Condition="'$(PackagesBasePath)'==''">$(ArtifactsBinDir)$(OSPlatformConfig)/</PackagesBasePath> | ||
| <PackageSymbolsBinDir Condition="'$(PackageSymbolsBinDir)' == ''">$(PackagesBasePath)symbols/</PackageSymbolsBinDir> | ||
|
|
||
| <AssetOutputPath Condition="'$(AssetOutputPath)'==''">$(ArtifactsShippingPackagesDir)</AssetOutputPath> | ||
| <SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)'==''">$(ArtifactsShippingPackagesDir)</SymbolPackageOutputPath> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Set up handling of build warnings --> | ||
| <PropertyGroup> | ||
| <WarningLevel>4</WarningLevel> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetsWindows>true</TargetsWindows> | ||
| <TargetsOSX>false</TargetsOSX> | ||
| <TargetsLinux>false</TargetsLinux> | ||
| <TargetsUnix>false</TargetsUnix> | ||
| <TargetsUbuntu>false</TargetsUbuntu> | ||
| <TargetsLinuxMint>false</TargetsLinuxMint> | ||
| <TargetsDebian>false</TargetsDebian> | ||
| <TargetsRhel>false</TargetsRhel> | ||
| <TargetsOpensuse>false</TargetsOpensuse> | ||
| <TargetsFedora>false</TargetsFedora> | ||
| <TargetsCentos>false</TargetsCentos> | ||
| <TargetsOracle>false</TargetsOracle> | ||
| <TargetsSles>false</TargetsSles> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Use actual publishable (non-dummy) package name produced by the build system for this RID --> | ||
| <PropertyGroup Condition="'$(OutputRid)' != ''"> | ||
| <PackageTargetRid>$(OutputRid)</PackageTargetRid> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(UsingNETSdkCompiler)' != 'true'"> | ||
| <!-- Disable some standard properties for building our projects --> | ||
| <NoStdLib>true</NoStdLib> | ||
| <NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib> | ||
| <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> | ||
| <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> | ||
|
|
||
| <!-- We do not want to target a portable profile. | ||
| TODO: Make this the default in buildtools so this is not necessary. --> | ||
| <TargetFrameworkProfile></TargetFrameworkProfile> | ||
| <!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) --> | ||
| <PortableNuGetMode>true</PortableNuGetMode> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <!-- Never use the NuGet fallback folder that comes with the SDK we use to build. | ||
| The NuGet fallback folder can/will contain packages we are building in this repo, and we | ||
| want to ensure we use the correct packages. | ||
| --> | ||
| <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <!-- Disable NuGet static graph evaluation as pkgprojs do their own restore. --> | ||
| <RestoreUseStaticGraphEvaluation>false</RestoreUseStaticGraphEvaluation> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <RequireLicenseAcceptance Condition="'$(RequireLicenseAcceptance)' == ''">false</RequireLicenseAcceptance> | ||
| <PackageRequireLicenseAcceptance>$(RequireLicenseAcceptance)</PackageRequireLicenseAcceptance> | ||
| <!-- This link should be updated for each release milestone, currently this points to 1.0.0 --> | ||
| <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799417</ReleaseNotes> | ||
| <ProjectUrl>https://github.com/dotnet/deployment-tools</ProjectUrl> | ||
| <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform> | ||
| <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform> | ||
|
|
||
| <!-- this repo doesn't currently use the index so don't force it to be in sync --> | ||
| <SkipIndexCheck>true</SkipIndexCheck> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <PackagesIntermediateDir>$(IntermediateOutputRootPath)packages/</PackagesIntermediateDir> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 16 | ||
| VisualStudioVersion = 16.0.30623.217 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{738213FF-7EC5-40F8-ACBE-F12C2578FC8B}" | ||
| ProjectSection(SolutionItems) = preProject | ||
| Directory.Build.props = Directory.Build.props | ||
| ..\..\eng\Subsets.props = ..\..\eng\Subsets.props | ||
| EndProjectSection | ||
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Deployment.DotNet.Releases", "src\Microsoft.Deployment.DotNet.Releases.csproj", "{61248599-2D6B-4EDE-9AB3-C423E02BE649}" | ||
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Deployment.DotNet.Releases.Tests", "tests\Microsoft.Deployment.DotNet.Releases.Tests.csproj", "{155F0C7B-BCA9-4711-BA87-94319C89F6AE}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {61248599-2D6B-4EDE-9AB3-C423E02BE649}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {61248599-2D6B-4EDE-9AB3-C423E02BE649}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {61248599-2D6B-4EDE-9AB3-C423E02BE649}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {61248599-2D6B-4EDE-9AB3-C423E02BE649}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {155F0C7B-BCA9-4711-BA87-94319C89F6AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {155F0C7B-BCA9-4711-BA87-94319C89F6AE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {155F0C7B-BCA9-4711-BA87-94319C89F6AE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {155F0C7B-BCA9-4711-BA87-94319C89F6AE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {536768EF-52D5-4CDB-A8B4-B06F3A5E1DE1} | ||
| EndGlobalSection | ||
| EndGlobal |
45 changes: 45 additions & 0 deletions
45
src/Microsoft.Deployment.DotNet.Releases/src/AspNetCoreReleaseComponent.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| using System; | ||
| using System.Collections.ObjectModel; | ||
| using Newtonsoft.Json.Linq; | ||
|
|
||
| namespace Microsoft.Deployment.DotNet.Releases | ||
| { | ||
| /// <summary> | ||
| /// Describes an ASP.NET Core release. | ||
| /// </summary> | ||
| public class AspNetCoreReleaseComponent : ReleaseComponent | ||
| { | ||
| /// <summary> | ||
| /// The versions of the ASP.NET Core Module in this release. | ||
| /// </summary> | ||
| public ReadOnlyCollection<Version> AspNetCoreModuleVersions | ||
| { | ||
| get; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// The friendly display name for the component. | ||
| /// </summary> | ||
| public override string Name => ReleasesResources.AspNetCoreReleaseName; | ||
|
|
||
| /// <summary> | ||
| /// The versions of Visual Studio that includes this runtime. Multiple versions may be listed, e.g. | ||
| /// "15.9.25, 16.0.16, 16.4.11, 16.6.4" | ||
| /// </summary> | ||
| public string VisualStudioVersion | ||
| { | ||
| get; | ||
| } | ||
|
|
||
| internal AspNetCoreReleaseComponent(JToken token, ProductRelease release) : base(token, release) | ||
| { | ||
| #pragma warning disable CA1825 // Avoid zero-length array allocations, Array.Empty<T> is only supported in netstandard2.1 | ||
| AspNetCoreModuleVersions = new ReadOnlyCollection<Version>(token["version-aspnetcoremodule"]?.ToObject<Version[]>(Utils.DefaultSerializer) ?? new Version[] { }); | ||
| #pragma warning restore CA1825 // Avoid zero-length array allocations | ||
| VisualStudioVersion = (string)token["vs-version"]; | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use
System.Text.Jsoninstead of an external 3rd party package?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to support 4.5.2 for some enterprise scenarios, which takes System.Text.Json off the table for us. If you want the latest copy you can only get that by going, but if you downloaded the files and laid them out on an internal machine you can use the local set of files without having to go online.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know to download them, that is somewhat unintuitive? How does a consumer know when there is a "latest copy", what if they never have internet connection. The idea of relying on parsing these JSON files is a bit fragile, there are inconsistencies. What about codifying this metadata in the package itself, so that it doesn't need to relying on parsing JSON and making HTTP requests. All the past releases are not changing, maybe this would be a use-case for code generators?