Repository navigation
Conversation
Reviewer's GuideAPIExtend the CLI download interface to accept and validate an optional MediaMTX version, preserving v1.22.0 as the default.
DocumentationDocument how to select a version, its default and version-specific cache behavior in the CLI help and README.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit 7de94ce #1411 feat(MediaMTX.Cli): allow selecting MediaMTX versions · 3 of 3 met
|
| else | ||
| { | ||
| await MediaMtxInstaller.DeployAsync(source, rid, output, download, copy || defaultAction, force, | ||
| await MediaMtxInstaller.DeployAsync(source, version, rid, output, download, copy || defaultAction, force, |
There was a problem hiding this comment.
🟡 Medium · Deployment files come from different versions
When two CLI processes copy different selected versions to the same output directory, or a copy stops after replacing only one file, CopyToolsAsync moves the executable and license separately without an output-level lock or pair-level commit, so the output directory ends up with files from different versions and a later build sees an inconsistent deployment.
Protect both file replacements with a shared output-level lock and commit them as a pair.
Also at tools/BootstrapBlazor.MediaMtx.Cli/MediaMtxInstaller.cs:103.
| [GeneratedRegex("^[0-9a-fA-F]{64}$", RegexOptions.CultureInvariant)] | ||
| private static partial Regex Sha256Regex(); | ||
|
|
||
| [GeneratedRegex("^v\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$", RegexOptions.CultureInvariant)] |
There was a problem hiding this comment.
🟡 Medium · Malformed tags reach release lookup
When the supplied version has an invalid prerelease suffix, such as a trailing hyphen, NormalizeVersion accepts malformed prerelease tags such as v1.22.0- because the optional suffix permits a lone hyphen; DeployAsync then queries the release API and reports a download failure instead of rejecting the version during validation.
Validate prerelease identifiers so the suffix cannot be empty or contain empty dot-separated identifiers.
| if (index + 1 < args.Length && !args[index + 1].StartsWith("--", StringComparison.Ordinal)) | ||
| { | ||
| var versionArgument = args[++index].Trim(); | ||
| if (versionArgument.Length > 0) | ||
| { | ||
| version = MediaMtxInstaller.NormalizeVersion(versionArgument); |
There was a problem hiding this comment.
🟠 High · Version selection cannot be published
When the CLI is packaged or published without overriding its project version, the CLI project still declares package version 11.0.4, and dotnet-tools.json pins that same version, so publishing this change under the current version cannot deliver the new option to users; the repository README also says same-version packages are immutable.
Increment the CLI package version and update the pinned version in dotnet-tools.json.
Link issues
fixes #1411
Summary By Copilot
--download; accept tags with or without the leadingv, validate the version, and retainv1.22.0as the default.bb-mediamtxpackage skill with version-selection behavior.Regression?
This is additive; omitting the version preserves the existing
v1.22.0default.Risk
The change is limited to parsing and validating the optional version, version-scoped caching, and related documentation. Existing source selection and default behavior remain unchanged.
Verification
Manual (required)
Automated
dotnet build tools\BootstrapBlazor.MediaMtx.Cli --no-restore— passed (0 warnings, 0 errors).No dedicated CLI test project was found; no automated tests were run.
Manual verification was not performed.
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Allow users to choose which MediaMTX release the CLI downloads while preserving the existing default.
New Features:
--downloadto select a MediaMTX release version, accepting tags with or without a leadingvand defaulting tov1.22.0.Documentation:
bb-mediamtxpackage skill with version-selection and cache behavior.