Merge pull request #753 from spk/reproductible-builds

Remove date macro on version for reproducible builds
This commit is contained in:
Alex 2020-06-24 18:22:36 +02:00 committed by GitHub
commit 8f684f703e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ else
if meson.source_root() == git_path if meson.source_root() == git_path
git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags']).stdout().strip() git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags']).stdout().strip()
git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip() git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip()
version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch) version = '"@0@ (branch \'@1@\')"'.format(git_commit_hash, git_branch)
add_project_arguments('-DVERSION=@0@'.format(version), language: 'cpp') add_project_arguments('-DVERSION=@0@'.format(version), language: 'cpp')
else else
add_project_arguments('-DVERSION="@0@"'.format(meson.project_version()), language: 'cpp') add_project_arguments('-DVERSION="@0@"'.format(meson.project_version()), language: 'cpp')