Skip to content

Download nuget via known versioning #149

@Splaxi

Description

@Splaxi

Most people that works with the D365 FO/SCM/Commerce stack, references to the more classic version naming scheme:

{
"version": "10.0.45",
"data": {
"FSCFinalQualityUpdatePackageId": "",
"PlatformVersionLatest": "7.0.7690.91",
"AppVersionGA": "10.0.2345.35",
"FSCServiseUpdatePackageId": "6c4ae2f2-30d8-42ec-8885-3c4a48913b4b",
"EcommerceMicrosoftRepoBranch": "RS/10.0.45",
"PlatformVersionGA": "7.0.7690.33",
"AppVersionLatest": "10.0.2345.124",
"PlatformUpdate": 69,
"FSCPreviewVersionPackageId": "b496cab0-7fcf-4ddf-84a7-e252d38eb5c3",
"FSCLatestQualityUpdatePackageId": "6c4ae2f2-30d8-42ec-8885-3c4a48913b4b"
}
},
{
"version": "10.0.46",
"data": {
"AppVersionLatest": "10.0.2428.15",
"PlatformUpdate": 70,
"FSCPreviewVersionPackageId": "14b9b055-2cc1-44c2-967d-707e28736a73",
"PlatformVersionLatest": "7.0.7778.8",
"FSCServiseUpdatePackageId": "",
"AppVersionGA": "10.0.2428.15",
"EcommerceMicrosoftRepoBranch": "",
"PlatformVersionGA": "7.0.7778.8",
"FSCFinalQualityUpdatePackageId": "",
"FSCLatestQualityUpdatePackageId": "14b9b055-2cc1-44c2-967d-707e28736a73"
}
}

But all nuget files, has to be downloaded via the versions of the packages itself:

Get-FSCPSNuget -Version 7.0.7690.33 -Path C:\Temp\fscps.tools\10.0.45 -Type PlatformCompilerPackage

When looking at the DevOps extension - I can see that you already in some form, support the known versioning, and is able to download the nugets based on that:

Image

Looking at the linked versions.default.json file, I made this quick hack - to be able to convert / extract between the known version and the nuget versions.

$localUri = "https://raw.githubusercontent.com/fscpscollaborative/fscps/master/Actions/Helpers/versions.default.json"

$versionObj = Invoke-RestMethod `
    -Method Get `
    -Uri $localUri

$versionObj | Select-PSFObject -ExcludeProperty "version" `
    -Property "version as Version" `
    , "Data.AppVersionGA as AppVersionGA" `
    , "Data.AppVersionLatest as AppVersionLatest" `
    , "Data.PlatformVersionGA as PlatformVersionGA" `
    , "Data.PlatformVersionLatest as PlatformVersionLatest"
Image

We could go 2 ways, or both. Write a cmdlet, that simply does what I just wrote. Makes it possible for people to translate from the known versioning into the details.
OR - we could get the module to run the same file, that is part of the module - with the option to pull directly from the file in the repository, but have it exposed in the Get-FSCPSNuget ala this:

Get-FSCPSNuget -KnownVersion 10.0.45 -KnownType GA -Path C:\Temp\fscps.tools\10.0.45 -Type PlatformCompilerPackage

While we are at it - I would argue that we should support the option "All", because from my perspective, I need all files. The KnownType should be GA or Hotfix, that translates into the latest / hotfix of the nugets.

I'm more than happy to take a swing at it, if you want - and feel it makes sense for your module 🤞

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions