Skip to content

Update-ReadmeBadges.ps1 warns on every RC package; compare against the numeric version core #39

Description

@anthony-lopez-pd

Problem
.github/scripts/Update-ReadmeBadges.ps1 (added in #37) warns when the PepperDashEssentials PackageReference version differs from the factory's MinimumEssentialsFrameworkVersion:

WARNING: badges: PepperDashEssentials package 3.0.0-rc.11 != MinimumEssentialsFrameworkVersion 3.0.0

For a v3 plugin pinned to an RC package, this warning fires on every commit, even though "3.0.0" is the correct minimum. The tempting "fix" is to copy the RC string into the factory (MinimumEssentialsFrameworkVersion = "3.0.0-rc.11"), and that silently disables the plugin:

  • Essentials' Global.IsRunningMinimumVersionOrHigher parses the minimum with new System.Version(minimumVersion), which throws on -rc.N. The catch returns false and the plugin load is bypassed with only a Verbose log line. Verified on Essentials v2.12.1 through v3.0.0-rc.11.
  • The script's own extraction regex ("(\d+(?:\.\d+)+)") also wouldn't find an RC minimum and fails with "MinimumEssentialsFrameworkVersion not found".

Proposed fix
Compare only the numeric major.minor.patch core of the package version against the minimum. For example, strip everything from the first - or + before comparing, so 3.0.0-rc.11 vs 3.0.0 doesn't warn, but 2.42.4 vs 3.0.0 still does. Optionally, add a one-line hint to the warning: "MinimumEssentialsFrameworkVersion must be numeric (e.g. 3.0.0), never a prerelease string."

Context

  • The same "minimum must equal the package version" rule also appears in the git-config-updates branch factories ("2.42.4"). That's fine for GA packages, but worth stating as the numeric core once the template moves to v3.
  • Related agent-workspace doc fix: PepperDash-Engineering/pdt-copilot-agents#114.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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