Commit 7ca98bf
committed
fix(version-extraction): support date-based version numbers
Problem:
- ruby-build shows blue ? instead of green ✅ despite versions matching
- Snapshot shows latest_version: '' (empty string)
- extract_version_number() regex requires dots, fails on date versions
Root cause:
- Regex pattern \d+(?:\.\d+)+ requires at least one dot
- Date-based versions like '20251023' have no dots
- Version extraction fails, returns empty string
- Status becomes UNKNOWN instead of UP-TO-DATE
Solution:
- Change regex from \d+(?:\.\d+)+ to \d+(?:\.\d+)*
- Makes dots optional (zero or more instead of one or more)
- Now supports both formats:
- Semantic: 1.2.3, 1.2.3.4
- Date-based: 20251023, 20250822
Impact:
- ruby-build: 20251023 === 20251023 (green ✅)
- parallel: 20250822 detected correctly
- All dotted versions still work (1.2.3, etc)
Verification:
- Tested: 20251023, v20251023, 1.2.3, v1.2.3, ruby-build-20251023
- All extract correctly with new regex
- Status determination now accurate for date-based tools1 parent aeba636 commit 7ca98bf
2 files changed
Lines changed: 15 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
0 commit comments