Azure / Azure/azure-cli-extensions

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

Open
#7,875 2 comments 0 reactions 1 assignee Claimed by @jsntcy View on GitHub
Azure CLI Team customer-reported question
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

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

Example:

```pwsh
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

```pwsh
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.