mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 21:41:03 +00:00
version-helper: Take CARGO_MANIFEST_DIR at runtime, not at compile-time
Otherwise we'll always look at the directory of the version-helper crate instead of the crate that is actually compiled.
This commit is contained in:
parent
d0e5868880
commit
8b4f0f91a9
1 changed files with 3 additions and 2 deletions
|
@ -36,7 +36,7 @@
|
|||
|
||||
use chrono::TimeZone;
|
||||
use git2::{Commit, ObjectType, Repository};
|
||||
use std::{fs, path};
|
||||
use std::{env, fs, path};
|
||||
|
||||
/// Extracts release for GStreamer plugin metadata
|
||||
///
|
||||
|
@ -77,7 +77,8 @@ pub fn get_info() {
|
|||
let mut commit_id = "UNKNOWN".into();
|
||||
let mut commit_date = chrono::Utc::now().format("%Y-%m-%d").to_string();
|
||||
|
||||
let crate_dir = path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
let crate_dir =
|
||||
path::PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set"));
|
||||
let mut repo_dir = crate_dir.clone();
|
||||
|
||||
// First check for a git repository in the manifest directory and if there
|
||||
|
|
Loading…
Reference in a new issue