Fix version strings when building from tarball

When that tarball has been extracted in an (unrelated) git repository.
This commit is contained in:
Robbert van der Helm
2021-06-09 16:19:01 +02:00
parent 8f655f71a6
commit 70d18edce2
2 changed files with 12 additions and 3 deletions
+3
View File
@@ -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.
+9 -3
View File
@@ -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@'