Commit 805a22c
committed
fix: correct version string for development builds
- Use git describe --exact-match to detect tagged commits
- Check for dirty working tree with git status --porcelain
- Use tag version ONLY if exact match AND clean working tree
- Otherwise fallback to v0.0.0-dev+<commit-hash> format
- Fixes issue where development builds showed old release tags
This ensures that:
1. Tagged commits with clean tree show release version (e.g., v1.0.0-beta.62)
2. Development builds show v0.0.0-dev+<commit-hash> format
3. Dirty working tree always shows dev version
Signed-off-by: NETIZEN-11 <niteshkumar121411@gmail.com>1 parent 2cd4e75 commit 805a22c
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
27 | | - | |
| 40 | + | |
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
| |||
0 commit comments