forked from 1b-agent/opencadstudio-upstream
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
58c9fcb748
commit
5f161bb037
31 files changed
+204
-18
No files matched your search
@@ -481,6 +481,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"Bring to Front" => Some(("ui", "bring-to-front")),
|
||||
"Browse, install, and manage add-ons. Select one to view its README." => Some(("plugins", "browse-install-and-manage-add-ons-select-one-t")),
|
||||
"Browser storage" => Some(("options", "browser-storage")),
|
||||
"Build" => Some(("ui", "build")),
|
||||
"Building scene caches…" => Some(("ui", "building-scene-caches")),
|
||||
"Bump Map" => Some(("properties", "bump-map")),
|
||||
"By annotation scale" => Some(("styles", "by-annotation-scale")),
|
||||
@@ -645,6 +646,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"Command Aliases" => Some(("command", "command-aliases")),
|
||||
"Command cancelled because the active drawing space changed." => Some(("common", "command-cancelled-because-the-active-drawing-s")),
|
||||
"Command history navigation" => Some(("common", "command-history-navigation")),
|
||||
"Commit date" => Some(("ui", "commit-date")),
|
||||
"Command:" => Some(("common", "command-label-title-case")),
|
||||
"Commands: %{cmds}" => Some(("plugins", "commands-cmds")),
|
||||
"Compact" => Some(("ui", "compact")),
|
||||
@@ -2234,6 +2236,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"Refraction Map" => Some(("properties", "refraction-map")),
|
||||
"Region" => Some(("properties", "region")),
|
||||
"Registered Class Entity" => Some(("properties", "registered-class-entity")),
|
||||
"Release" => Some(("ui", "release")),
|
||||
"Reload failed: {error}" => Some(("file", "reload-failed-error")),
|
||||
"Reload from Disk" => Some(("modal", "reload-from-disk")),
|
||||
"Remote Text" => Some(("properties", "remote-text")),
|
||||
|
||||
Reference in new issue
Block a user