diff --git a/CHANGELOG.md b/CHANGELOG.md index 6be43468..16479f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,9 @@ Versioning](https://semver.org/spec/v2.0.0.html). because those plugins don't initialize Microsoft COM before trying to use it. We now always initialize the Microsoft COM library unconditionally, instead of doing it only when a plugin fails to initialize without it. +- Fixed incorrect version strings reported by yabridge when building from a + tarball that has been extracted inside of a git repository. This could happen + when building the `yabridge` AUR package with certain AUR helpers. - Fixed log message for the cached `IPlugView::canResize()` VST3 function calls implemented in yabridge 3.2.0. diff --git a/src/common/config/meson.build b/src/common/config/meson.build index 6c88ee17..ad6cf081 100644 --- a/src/common/config/meson.build +++ b/src/common/config/meson.build @@ -13,10 +13,16 @@ config_header = configure_file( ) ) -# Generate a file containing the last annotated git tag and possibly also the -# amount of commits since then and the hash of the last commit +# Generate a file containing the last annotated git tag, the amount of commits +# since then, and the hash of the last commit +# NOTE: We explicitly specify the git directory to be relative to the main +# `meson.build` file. Otherwise git will search up the file tree, which +# might cause `git describe` to be run in an unrelated repository when +# building from a tarball that's been extracted inside of a git +# directory, like when building the `yabridge` AUR package. In that case +# `vcs_tag()` should always fall back to the Meson project version. version_header = vcs_tag( - command : ['git', 'describe', '--always'], + command : ['git', '--git-dir=' + (meson.source_root() / '.git'), 'describe', '--always'], input : 'version.h.in', output : 'version.h', replace_string : '@VCS_VERSION@'