mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-05 04:06:24 -05: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
|
have_xwayland = false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
version = '@0@'.format(meson.project_version())
|
||||||
git = find_program('git', native: true, required: false)
|
git = find_program('git', native: true, required: false)
|
||||||
if git.found()
|
if git.found()
|
||||||
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'])
|
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'])
|
||||||
|
|
@ -86,8 +87,6 @@ if git.found()
|
||||||
git_branch.stdout().strip(),
|
git_branch.stdout().strip(),
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
else
|
|
||||||
version = '@0@'.format(meson.project_version())
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
conf_data = configuration_data()
|
conf_data = configuration_data()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue