Skip to content

Add version (e.g. 0.10.0) to msi file#901

Merged
spoorcc merged 1 commit intomainfrom
version-flag-msi
Jan 1, 2026
Merged

Add version (e.g. 0.10.0) to msi file#901
spoorcc merged 1 commit intomainfrom
version-flag-msi

Conversation

@spoorcc
Copy link
Contributor

@spoorcc spoorcc commented Jan 1, 2026

Summary by CodeRabbit

  • Chores
    • Improved Windows installer build: generated MSI is now renamed to include the package version for clearer distribution.
    • Added validation and selection during the Windows installer step to automatically pick the built MSI and fail early if none is found.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 1, 2026

📝 Walkthrough

Walkthrough

Workflow now looks up the built MSI at runtime and fails if none exists; packaging script renames/moves the generated MSI to a versioned filename immediately after build completion.

Changes

Cohort / File(s) Summary
Windows MSI discovery & versioned output
\.github/workflows/build.yml, script/package.py
CI step changed from a hardcoded dfetch.msi to selecting the first dfetch*.msi and throwing if not found; packaging script moves/renames the built MSI to "{PACKAGE_NAME}_{__version__}.msi" in the output dir.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I sniffed the build with twitching nose,
I found the MSI where mystery grows,
I nudged it gently, gave it a name,
Versioned and tidy — hop! — that's my game,
A tiny hop for code, a joyful claim.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The title 'Add version (e.g. 0.10.0) to msi file' accurately describes the main change: versioning the MSI filename by appending version numbers to the file.
✨ Finishing touches
  • 📝 Generate docstrings

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.

Base automatically changed from generate-sbom to main January 1, 2026 19:04
@spoorcc spoorcc marked this pull request as ready for review January 1, 2026 19:04
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: 0

🧹 Nitpick comments (1)
.github/workflows/build.yml (1)

132-133: Code is correct; suggestions are optional improvements.

The dynamic MSI discovery with error handling works as intended. The naming pattern is confirmed—the packaging script generates dfetch_<version>.msi which correctly matches the wildcard.

Two notes on the original suggestions:

  1. Using $file in the quoted string (line 135) is idiomatic PowerShell—FileInfo objects automatically convert to their filename string representation in string context. Adding .Name is unnecessary.

  2. Handling multiple MSI files via sorting is a defensive measure, but unlikely needed here: GitHub Actions downloads artifacts to a clean per-job directory, so only the current build's MSI exists. Select-Object -First 1 is sufficient for this context.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 216aeac and 8964197.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • script/package.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • script/package.py
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-25T23:53:05.742Z
Learnt from: spoorcc
Repo: dfetch-org/dfetch PR: 861
File: .github/workflows/build.yml:120-125
Timestamp: 2025-12-25T23:53:05.742Z
Learning: When building macOS PKG installers with fpm in CI, account for the known issue (fpm #1996) where --prefix can be duplicated (e.g., /opt/dfetch becomes /opt/dfetch/opt/dfetch). In the workflow at .github/workflows/build.yml, verify install paths and PATH entries do not assume a single-prefix layout. Adjust packaging scripts or fpm arguments to normalize the final install location and update PATH references accordingly. Add a test step to validate the expected runtime paths after installation.

Applied to files:

  • .github/workflows/build.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
  • GitHub Check: Publish Python distribution 📦 to TestPyPI
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: test (macos-latest, 3.11)
  • GitHub Check: test (windows-latest, 3.13)
  • GitHub Check: test (windows-latest, 3.11)
  • GitHub Check: test (macos-latest, 3.14)
  • GitHub Check: test (windows-latest, 3.14)
  • GitHub Check: test (windows-latest, 3.12)
  • GitHub Check: test (windows-latest, 3.9)
  • GitHub Check: test (macos-latest, 3.13)
  • GitHub Check: test (windows-latest, 3.10)
  • GitHub Check: test (macos-latest, 3.10)
  • GitHub Check: test (ubuntu-latest, 3.14)
  • GitHub Check: test (ubuntu-latest, 3.10)
  • GitHub Check: test (ubuntu-latest, 3.9)
  • GitHub Check: test-cygwin
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: DevContainer Build & Test
  • GitHub Check: test

@spoorcc spoorcc changed the title Add version flag to msi Add version (e.g. 0.10.0) to msi file Jan 1, 2026
@spoorcc spoorcc merged commit 1c677cb into main Jan 1, 2026
39 checks passed
@spoorcc spoorcc deleted the version-flag-msi branch January 1, 2026 20:08
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