feat(cli): print the build id on --version (#7129)

`openidea --version` prints a second line `Build #<id>` from `OPENIDEA_BUILD` at compile time (`dev` when unset, like the About dialog). The release build job now sets `OPENIDEA_BUILD` to the commit SHA, so official builds report it in About and on --version instead of `dev`.

Co-authored-by: nako-ruru <[email protected]>
Цей коміт міститься в:
nako-ruruтаnako-ruru authored and GitHub committed 2026-12-05 09:06:15 +08:00
1 джерело d84cae9525
коміт 7d4d0cb921
2 files changed
+2

No files matched your search

+1
Переглянути файл
@@ -47,6 +47,7 @@ jobs:
environment: release
env:
OPENIDEA_OFFICIAL_PLUGIN_KEYS: ${{ needs.plugin-keys.outputs.keys }}
OPENIDEA_BUILD: ${{ github.sha }}
strategy:
fail-fast: false
matrix:
+1
Переглянути файл
@@ -44,6 +44,7 @@ fn client(identifier: &str, args: &[String]) -> Result<(), String> {
}
Command::Version => {
println!("OpenIDEA {}", env!("CARGO_PKG_VERSION"));
println!("Build #{}", option_env!("OPENIDEA_BUILD").unwrap_or("dev"));
return Ok(());
}
Command::Open(targets) | Command::Diff(targets) => targets,