Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
380 stars 1.2k forks source link

Preview versions in `index.json` is not valid semantic versions #7875

Open o-l-a-v opened 1 month ago

o-l-a-v commented 1 month ago

Describe the bug

Preview version numbers in index.json, fetched with az extension list-available, is not valid semantic versions.

Example:

PS > az extension list-available | ConvertFrom-Json | Select-Object -Last 1

experimental : False
installed    : False
name         : workloads
preview      : True
summary      : Microsoft Azure Command-Line Tools Workloads Extension.
version      : 1.1.0b2

PS >

If one ads a hyphen to it 1.1.0b2 => 1.1.0-b2, it becomes valid.

Why use a non-standard version scheme? Makes it harder to parse.

Related command

az extension list-available

Errors

PS > [semver]'1.1.0b2'

InvalidArgument: Cannot convert value "1.1.0b2" to type "System.Management.Automation.SemanticVersion". Error: "The input string '' was not in a correct format."

PS >

Issue script & Debug output

Not relevant.

Expected behavior

Use standard version schemes.

Environment Summary

Not relevant.

Additional context

No response

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.

o-l-a-v commented 1 month ago

So Python has its own version scheme?

Dotnet has NuGet.Versioning which also isn't semver compatible, so maybe I can't complain.

Would still be great with a semver compatible version number in the metadata somewhere.