Show the exact build in About, Copy Info, REPORT and --version

Builds from main reported only the release version (2026.36) even when
HEAD was hundreds of commits past the tag. build.rs now also emits
OCS_TAG_DISTANCE, OCS_COMMIT_DATE, OCS_BUILD_METADATA and
OCS_FULL_VERSION: a clean checkout of the release tag stays "2026.36",
anything else becomes "2026.36+194.gef189d77", with ".dirty" appended
for uncommitted changes and only the hash when no tag can be counted
from (shallow clone, tarball). OCS_APP_VERSION is unchanged so the
update check, donation gate, User-Agents and window title keep working.

The About dialog gains Build / Commit date / Profile cards, Copy Info,
the REPORT issue template and recovery reports carry the full version,
and `-V`/`--version` print it instead of Cargo's 2026.36.0. Release
workflows check out full history so release binaries see the tag.

Also fixes the build being marked dirty when there is no repository:
diff-index exits 128 there, not 1.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-12 16:19:40 +03:00
1 parent 58c9fcb748
commit 5f161bb037
31 files changed
+204 -18

No files matched your search

+9
View File
@@ -18,6 +18,15 @@ download for the installed platform.
The app shows `2026.35`, Cargo and macOS use `2026.35.0`, and MSI uses `26.35.0`.
The main window title is `Open CAD Studio 2026.35 - Drawing.dwg`.
Builds that are not a clean checkout of the release tag carry build metadata:
`2026.35+194.gef189d77` means 194 first-parent commits past `v2026.35` at
commit `ef189d77`, and `.dirty` is appended when the tree has uncommitted
changes. `build.rs` derives this from git at compile time (`OCS_FULL_VERSION`);
without a tag to count from (shallow clone, source tarball) only the hash is
shown. The full form appears in About, **Copy Info**, `REPORT`, `--version`
and recovery reports. The window title, update check and User-Agent keep the
plain `2026.35`.
To preview release notes, manually run **Weekly release** on `main` with
**publish** unchecked. Check **publish** to release immediately. Rerunning
within the same week reuses the original tag and commit. To rebuild just a