Skip to content

fix binary version mismatch#778

Merged
dogancanbakir merged 1 commit into
mainfrom
fix/version-mismatch
Apr 2, 2026
Merged

fix binary version mismatch#778
dogancanbakir merged 1 commit into
mainfrom
fix/version-mismatch

Conversation

@dogancanbakir
Copy link
Copy Markdown
Member

@dogancanbakir dogancanbakir commented Apr 2, 2026

closes #695

  • inject version from git tag via goreleaser ldflags
  • change const version to var version so ldflags can override it
  • fix version-bump cron to run before auto-release

Summary by CodeRabbit

  • Chores
    • Internal code structure update with no impact on user-facing functionality or features.

@neo-by-projectdiscovery-dev
Copy link
Copy Markdown

neo-by-projectdiscovery-dev Bot commented Apr 2, 2026

Neo - PR Security Review

No security issues found

Comment @pdneo help for available commands. · Open in Neo

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5d3ea481-b0b5-4838-84a7-bc52d0dbe76c

📥 Commits

Reviewing files that changed from the base of the PR and between de4de58 and 8d8d69b.

⛔ Files ignored due to path filters (2)
  • .github/workflows/version-bump.yml is excluded by !**/*.yml
  • .goreleaser.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • cmd/mapcidr/main.go

Walkthrough

The version identifier in cmd/mapcidr/main.go was converted from a compile-time constant to a variable, enabling runtime version injection during build processes while maintaining the existing version string v1.1.116.

Changes

Cohort / File(s) Summary
Version Declaration Update
cmd/mapcidr/main.go
Changed version from a compile-time constant to a variable, allowing build-time injection of version strings via linker flags (e.g., -ldflags), facilitating proper version reporting in binary releases.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A version now flexible, not set in stone,
No longer a constant, a variable grown!
Build flags can whisper the truth now so clear,
The binary speaks true—the right version is here! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix binary version mismatch' directly addresses the main change: converting version from a const to a var to allow ldflags injection, which fixes the reported version mismatch issue.
Linked Issues check ✅ Passed The PR addresses the core requirement from issue #695 by enabling version injection through goreleaser ldflags via const-to-var conversion, allowing binary version to match release tags.
Out of Scope Changes check ✅ Passed The single change (const to var for version) is directly scoped to the issue requirement and contains no unrelated modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/version-mismatch

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

@Ice3man543 Ice3man543 self-requested a review April 2, 2026 11:08
@dogancanbakir dogancanbakir merged commit 07f4c73 into main Apr 2, 2026
8 checks passed
@dogancanbakir dogancanbakir deleted the fix/version-mismatch branch April 2, 2026 11:11
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.

[Issue] Binary version mismatch

2 participants