Commit 28608da
Stamp dev builds 0.0.0-dev and suppress update notifications for them
Two related fixes:
1. Dev / from-source builds were stamping MSBuild's default 1.0.0 (no <Version> in csproj), which masqueraded as a real release version in the new Settings > Updates > Current version row. Now stamps 0.0.0-dev. CI's release workflow stamps the real tag via -p:Version=, which wins over the csproj default.
2. With 0.0.0 stamped, BrowserNotifyUpdateService.CheckAsync would otherwise compare against the latest GitHub release (e.g. v1.6.0) and tell the dev they need to update -- a false signal, because tip-of-master is by definition either at or ahead of the most recent published tag. Added a dev-build sentinel check at the top of CheckAsync: when current version is 0.0.0[.0], short-circuit to NoUpdateAvailable without hitting the network.
Added IsDevBuild helper (internal, visible to tests) so the policy lives next to the version comparison rather than scattered. Tested across Version(0,0,0) vs Version(0,0,1)/etc and the corner-case Version(0,0) where Build = -1.
Verified end-to-end locally: dotnet publish -c Release stamps ProductVersion as '0.0.0-dev+<git-hash>' (SourceLink-style hash suffix is automatic when building in a git repo; AppVersionInfo.GetDisplayVersion strips it for display so users see plain '0.0.0-dev').
Tests: 1448 passing (+8 from IsDevBuild theories + the zero-version short-circuit test), 1 skipped. 0 warnings, 0 errors in dotnet build -c Release. CHANGELOG [Unreleased] documents both changes.
AI-Local-Session: 4519f6b6-393a-4476-8efa-410e5396c3a9
AI-Cloud-Session: 72f9e474-60ab-42c2-b2a0-28fee827cbbb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 3d2b534 commit 28608da
4 files changed
Lines changed: 95 additions & 0 deletions
File tree
- DiffViewer.Tests/Services
- DiffViewer
- Services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
236 | 278 | | |
237 | 279 | | |
238 | 280 | | |
| |||
288 | 330 | | |
289 | 331 | | |
290 | 332 | | |
| 333 | + | |
| 334 | + | |
291 | 335 | | |
292 | 336 | | |
293 | 337 | | |
294 | 338 | | |
295 | 339 | | |
296 | 340 | | |
297 | 341 | | |
| 342 | + | |
298 | 343 | | |
299 | 344 | | |
300 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
12 | 24 | | |
13 | 25 | | |
14 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
| |||
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
165 | 190 | | |
166 | 191 | | |
167 | 192 | | |
| |||
0 commit comments