mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
meson: fix snapshot builds
Previously, is git was found but the build was run from a snapshot, `version` wouldn't be set. This commit fixes this by first setting version to the project version and only then, conditionally, setting it to the git version. Fixes #125.
This commit is contained in:
parent
42782bda1d
commit
6fa2734651
1 changed files with 1 additions and 2 deletions
|
|
@ -75,6 +75,7 @@ else
|
|||
have_xwayland = false
|
||||
endif
|
||||
|
||||
version = '@0@'.format(meson.project_version())
|
||||
git = find_program('git', native: true, required: false)
|
||||
if git.found()
|
||||
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'])
|
||||
|
|
@ -86,8 +87,6 @@ if git.found()
|
|||
git_branch.stdout().strip(),
|
||||
)
|
||||
endif
|
||||
else
|
||||
version = '@0@'.format(meson.project_version())
|
||||
endif
|
||||
|
||||
conf_data = configuration_data()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue