Skip to content

Commit

Permalink
Remove superfluous returncode check
Browse files Browse the repository at this point in the history
Given that the commands are called with `check: true`, meson will
immediately exit with an error if these commands exit non-zero.

See: #193
  • Loading branch information
WhyNotHugo committed Aug 23, 2023
1 parent 617ed87 commit 78e5dc4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ git = find_program('git', native: true, required: false)
if fs.is_dir('.git') and git.found()
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: true)
git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: true)
if git_commit.returncode() == 0 and git_branch.returncode() == 0
version = '"@0@-@1@ (" __DATE__ ", branch \'@2@\')"'.format(
meson.project_version(),
git_commit.stdout().strip(),
git_branch.stdout().strip(),
)
endif
version = '"@0@-@1@ (" __DATE__ ", branch \'@2@\')"'.format(
meson.project_version(),
git_commit.stdout().strip(),
git_branch.stdout().strip(),
)
endif

add_project_arguments('-DWFRECORDER_VERSION=@0@'.format(version), language: 'cpp')
Expand Down

0 comments on commit 78e5dc4

Please sign in to comment.