mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(rust): fallback to CARGO_PKG_VERSION if git is unavailable (#7188)
When building inside a docker container, like we do for the headless-client and gateway, the `.git` directory is not available. Thus, determining what our current version is fails and gets reported as "unknown". We are now also using this for Sentry which is not very helpful if all errors are categorised under the same version. In case somebody builds a gateway / client from source, we will have the full version available. Most users will use our docker containers though, meaning the version will only always be for a full release. Resolves: #7184.
This commit is contained in:
@@ -57,7 +57,7 @@ macro_rules! git_version {
|
||||
($regex:literal) => {
|
||||
$crate::__reexport::git_version!(
|
||||
args = ["--always", "--dirty=-modified", "--tags", "--match", $regex],
|
||||
fallback = "unknown"
|
||||
fallback = env!("CARGO_PKG_VERSION")
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user