Commit 0de44cd
committed
fix: sync version.json with the actual release version, fixing every published NuGet version
Root cause of every "release worked but the wrong version got published" mystery
this whole project: Nerdbank.GitVersioning never derives the version number from
the git tag, even when it correctly detects a public-release tag - it always
computes from version.json's own "version" field. That field had sat at
"0.1-alpha" unchanged since the first commit, so every release.yml run (v0.1.0
through v0.10.0) published an unrelated 0.1.x-alpha prerelease to NuGet.org
instead of its real tagged version.
Verified locally: with version.json at "0.1-alpha", nbgv get-version at the
exact v0.10.0-tagged commit reports PublicRelease: true but still computes
"0.1.69-alpha". Bumping version.json's "version" to the real current version
(a full three-component "0.10.0", not just "0.1") makes it compute exactly
"0.10.0" at that same commit - confirmed with a throwaway test commit/tag.
Also wires release-please-config.json's extra-files to update version.json's
"version" field automatically on every future release commit, so the two
version sources can't drift apart again. fetch-tags: true added to both
workflows' checkout steps as a defensive addition (not the actual cause here,
but the standard NBGV+GitHub Actions recommendation regardless).1 parent c9b0c40 commit 0de44cd
5 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments