Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf93072

Browse files
authored
add commit hash to version (#1016)
1 parent5a438e5 commitaf93072

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

‎pgml-extension/Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎pgml-extension/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ csv = "1.2"
5353
[dev-dependencies]
5454
pgrx-tests ="=0.10.0"
5555

56+
[build-dependencies]
57+
vergen = {version ="8",features = ["build","git","gitcl"] }
58+
5659
[profile.dev]
5760
panic ="unwind"
5861
lto ="thin"

‎pgml-extension/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ fn main() {
1616
"cargo:link-args=-Wl,--version-script={}/ld.map",
1717
std::env::current_dir().unwrap().to_string_lossy(),
1818
);
19+
20+
vergen::EmitBuilder::builder().all_git().emit().unwrap();
1921
}

‎pgml-extension/src/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub fn validate_shared_library() {
8484

8585
#[pg_extern(immutable, parallel_safe)]
8686
fnversion() ->String{
87-
crate::VERSION.to_string()
87+
format!("{} ({})",crate::VERSION,crate::COMMIT)
8888
}
8989

9090
#[allow(clippy::too_many_arguments)]

‎pgml-extension/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extern crate signal_hook;
77
use pgrx::*;
88

99
pubconstVERSION:&str =env!("CARGO_PKG_VERSION");
10+
pubconstCOMMIT:&str =env!("VERGEN_GIT_SHA");
1011

1112
pubmod api;
1213
pubmod bindings;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp