[][src]Function gst_plugin_version_helper::get_info

pub fn get_info()

Extracts release for GStreamer plugin metadata

Release information is first tried to be extracted from a git repository at the same place as the Cargo.toml, or one directory up to allow for Cargo workspaces. If no git repository is found, the information is extract from a release.txt in the same directory as the Cargo.toml.

  • If extracted from a git repository, sets the COMMIT_ID environment variable to the short commit id of the latest commit and the BUILD_REL_DATE environment variable to the date of the commit.

  • If extracted from a release.txt, COMMIT_ID will be set to the string RELEASE and the BUILD_REL_DATE variable will be set to the release date extracted from release.txt.

  • If neither is possible, COMMIT_ID is set to the string UNKNOWN and BUILD_REL_DATE to the current date.

release.txt

release.txt is only parsed if no git repository was found and is assumed to be in the format

version_number
release_date

for example

1.16.0
2019-04-19

If the version number from Cargo.toml is not equivalent to the one in release.txt, this function will panic.