Skip to content

Added missing version stamping#38

Merged
nefarius merged 2 commits intomasterfrom
version-stamping
Feb 28, 2026
Merged

Added missing version stamping#38
nefarius merged 2 commits intomasterfrom
version-stamping

Conversation

@nefarius
Copy link
Owner

@nefarius nefarius commented Feb 28, 2026

Summary by CodeRabbit

  • Chores
    • Ensures release builds include a consistently formatted version stamped into application resources for clearer artifact versions.
    • Updated local development config to ignore a Rider-specific temporary file, reducing noise in developer workflows.

@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8652ce6 and 9cd778f.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

Adds two new steps to the release GitHub Actions workflow: install the Nefarius.Tools.Vpatch .NET global tool, and derive/normalize a version from the Git tag to stamp file- and product-version into Injector/Injector.rc. Also adds a Rider ignore rule for /.release-local.

Changes

Cohort / File(s) Summary
Release Workflow
.github/workflows/release.yml
Inserts two steps after Checkout: install Nefarius.Tools.Vpatch as a .NET global tool (updates GITHUB_PATH), then derive tagVersion from the Git ref (strip leading v, normalize to 3–4 numeric segments, validate numeric segments) and run vpatch to stamp Injector/Injector.rc file-version and product-version.
IDE Ignore
.gitignore
Adds /.release-local to JetBrains Rider ignore entries.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Repo as Repository
  participant Vpatch as vpatch (global tool)

  GH->>Repo: Checkout code and Git ref
  GH->>GH: Extract ref name, strip "v", normalize to 3–4 numeric segments, validate numeric
  GH->>Vpatch: Ensure vpatch installed and in PATH
  GH->>Repo: Invoke vpatch to stamp Injector/Injector.rc with file/product version
  Repo-->>GH: Updated resource file committed in workflow context (artifact/state)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐇 I hop from tag to tag with glee,

I strip the "v" and shape the three,
Vpatch I fetch, then gently press,
Into RC fields I leave my dress,
Release now hums — a rabbit's bless.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Added missing version stamping' directly aligns with the main changes: adding version stamping steps to the release workflow and supporting infrastructure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch version-stamping

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.gitignore (1)

399-399: Consider moving this entry to a more appropriate section.

The .release-local entry is placed under the "JetBrains Rider" section, but based on the naming it appears to be for local release workflow testing rather than Rider-specific. Consider adding a dedicated comment section like # Local release testing or placing it under "Others" for better organization.

This is a minor nit and doesn't affect functionality.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore at line 399, The .release-local gitignore entry is currently
under the "JetBrains Rider" section but is for local release testing; move the
".release-local" line out of the Rider section and either add a new comment
header like "# Local release testing" above it or place it under the existing
"Others" section so the entry is organized with similarly purposed ignores.
.github/workflows/release.yml (1)

27-31: Pin the vpatch tool version to prevent unexpected runtime failures.

Installing without a pinned version means the latest release will always be used, which can cause build failures. The Nefarius.Tools.Vpatch tool has released breaking changes, including runtime requirement upgrades (e.g., v2.5.0 → .NET 8.0, v2.6.0+ → .NET 9.0). Pin to a specific stable version:

-          dotnet tool install --global Nefarius.Tools.Vpatch
+          dotnet tool install --global Nefarius.Tools.Vpatch --version 2.6.1

Alternatively, use a committed .config/dotnet-tools.json manifest and dotnet tool restore for better reproducibility across dev and CI environments.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 27 - 31, Pin the
Nefarius.Tools.Vpatch installation in the "Install vpatch" workflow step by
specifying a fixed version (e.g., use the tool package id with a version) or
replace the ad-hoc install with a deterministic restore from a committed
.config/dotnet-tools.json manifest using dotnet tool restore; update the
workflow step that currently runs dotnet tool install --global
Nefarius.Tools.Vpatch (and the GITHUB_PATH export lines) to either include the
exact version or switch to dotnet tool restore so CI uses the same pinned tool
version as dev machines.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Around line 33-45: The current PowerShell step that computes $tagVersion and
$versionParts can accept prerelease tags like "1.2.3-beta" because it only
checks segment count; update the validation in this stamping block to ensure
each segment (after optionally appending a fourth ".0") contains only digits
(e.g., use a numeric check or regex like '^\d+$' against each element of
$versionParts) and throw a clear error if any segment is non-numeric before
calling vpatch; reference the variables $tagVersion and $versionParts and the
vpatch invocation so the check runs immediately before vpatch is executed.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 27-31: Pin the Nefarius.Tools.Vpatch installation in the "Install
vpatch" workflow step by specifying a fixed version (e.g., use the tool package
id with a version) or replace the ad-hoc install with a deterministic restore
from a committed .config/dotnet-tools.json manifest using dotnet tool restore;
update the workflow step that currently runs dotnet tool install --global
Nefarius.Tools.Vpatch (and the GITHUB_PATH export lines) to either include the
exact version or switch to dotnet tool restore so CI uses the same pinned tool
version as dev machines.

In @.gitignore:
- Line 399: The .release-local gitignore entry is currently under the "JetBrains
Rider" section but is for local release testing; move the ".release-local" line
out of the Rider section and either add a new comment header like "# Local
release testing" above it or place it under the existing "Others" section so the
entry is organized with similarly purposed ignores.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31ecde8 and 8652ce6.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • .gitignore

@nefarius nefarius merged commit f732592 into master Feb 28, 2026
2 checks passed
@nefarius nefarius deleted the version-stamping branch February 28, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant