Title: Refactor: Extract VERSION_REGEX and validateVersion into a shared module · Issue #368 · getsentry/XcodeBuildMCP · GitHub
Open Graph Title: Refactor: Extract VERSION_REGEX and validateVersion into a shared module · Issue #368 · getsentry/XcodeBuildMCP
X Title: Refactor: Extract VERSION_REGEX and validateVersion into a shared module · Issue #368 · getsentry/XcodeBuildMCP
Description: Follow-up to #289. VERSION_REGEX and validateVersion are duplicated between: scripts/generate-version.ts src/utils/__tests__/generate-version-validation.test.ts The two copies have to be kept in sync manually. Bugbot's hyphen-in-pre-rele...
Open Graph Description: Follow-up to #289. VERSION_REGEX and validateVersion are duplicated between: scripts/generate-version.ts src/utils/__tests__/generate-version-validation.test.ts The two copies have to be kept in sy...
X Description: Follow-up to #289. VERSION_REGEX and validateVersion are duplicated between: scripts/generate-version.ts src/utils/__tests__/generate-version-validation.test.ts The two copies have to be kept in sy...
Opengraph URL: https://github.com/getsentry/XcodeBuildMCP/issues/368
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Refactor: Extract VERSION_REGEX and validateVersion into a shared module","articleBody":"Follow-up to #289.\n\n`VERSION_REGEX` and `validateVersion` are duplicated between:\n\n- `scripts/generate-version.ts`\n- `src/utils/__tests__/generate-version-validation.test.ts`\n\nThe two copies have to be kept in sync manually. Bugbot's hyphen-in-pre-release/build-metadata fix (commit `cb2a4fad` on PR #289) had to be applied in both places for that reason.\n\n## Why it wasn't done in #289\n\nExtracting the regex and validator into an importable module requires splitting `scripts/generate-version.ts` so that `main()` isn't invoked at import time. That's a larger refactor than the PR's scope and was explicitly deferred in the rebase notes.\n\n## Suggested shape\n\n- New module (e.g. `src/utils/version/version-regex.ts` or similar) exporting `VERSION_REGEX` and `validateVersion`.\n- `scripts/generate-version.ts` imports from that module and keeps its CLI `main()` behind a guard (`if (import.meta.url === ...)`).\n- The validation test imports the shared module instead of redefining the regex.\n\nThis is a maintainability nit, not a correctness fix — but the duplication will keep biting on every regex tweak until it's resolved.","author":{"url":"https://github.com/cameroncooke","@type":"Person","name":"cameroncooke"},"datePublished":"2026-04-26T21:13:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/368/XcodeBuildMCP/issues/368"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a378e7a5-47dd-7cb8-2247-84ebcf161356 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E876:2BCCB3:3B96B4:533EB0:6A4D0D09 |
| html-safe-nonce | 2802e6e3d02a00250fa42987da9fac30341ec04be70d7cf3b9f91e62a4f45e99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODc2OjJCQ0NCMzozQjk2QjQ6NTMzRUIwOjZBNEQwRDA5IiwidmlzaXRvcl9pZCI6IjYxMjI2NzA4OTA5MjY1NDIwODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 20ea07f82cbc777f04c2f2d95706b455013c4ea0bcbe87fccfc5d137316f085f |
| hovercard-subject-tag | issue:4331996792 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/XcodeBuildMCP/368/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3263f50b9d255fe880a89ff0e835f196ee2f820517803828114a2f44f2a0382c/getsentry/XcodeBuildMCP/issues/368 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3263f50b9d255fe880a89ff0e835f196ee2f820517803828114a2f44f2a0382c/getsentry/XcodeBuildMCP/issues/368 |
| og:image:alt | Follow-up to #289. VERSION_REGEX and validateVersion are duplicated between: scripts/generate-version.ts src/utils/__tests__/generate-version-validation.test.ts The two copies have to be kept in sy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cameroncooke |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/XcodeBuildMCP git https://github.com/getsentry/XcodeBuildMCP.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 945551361 |
| octolytics-dimension-repository_nwo | getsentry/XcodeBuildMCP |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 945551361 |
| octolytics-dimension-repository_network_root_nwo | getsentry/XcodeBuildMCP |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width