mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-19 19:14:53 +00:00
fix: build profile can be specified manually
This commit is contained in:
parent
68d7757aa4
commit
46df6d36e5
2 changed files with 22 additions and 8 deletions
29
meson.build
29
meson.build
|
@ -38,17 +38,30 @@ iconsdir = datadir / 'icons'
|
||||||
podir = meson.project_source_root() / 'po'
|
podir = meson.project_source_root() / 'po'
|
||||||
gettext_package = meson.project_name()
|
gettext_package = meson.project_name()
|
||||||
|
|
||||||
# are we building a tagged version?
|
opt_profile = get_option('profile')
|
||||||
if run_command('git', 'describe', '--tags', '--exact-match').returncode() != 0
|
|
||||||
profile = 'Devel'
|
# if a profile isn't specified infer from git
|
||||||
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
|
if opt_profile == 'default'
|
||||||
if vcs_tag == ''
|
# are we building a tagged version?
|
||||||
version_suffix = '-devel'
|
if run_command('git', 'describe', '--tags', '--exact-match').returncode() != 0
|
||||||
|
profile = 'Devel'
|
||||||
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
|
||||||
|
if vcs_tag == ''
|
||||||
|
version_suffix = '-devel'
|
||||||
|
else
|
||||||
|
version_suffix = '-@0@'.format(vcs_tag)
|
||||||
|
endif
|
||||||
|
application_id = '@0@.@1@'.format(base_id, profile)
|
||||||
else
|
else
|
||||||
version_suffix = '-@0@'.format(vcs_tag)
|
profile = ''
|
||||||
|
version_suffix = ''
|
||||||
|
application_id = base_id
|
||||||
endif
|
endif
|
||||||
|
elif opt_profile == 'development'
|
||||||
|
profile = 'Devel'
|
||||||
|
version_suffix = '-devel'
|
||||||
application_id = '@0@.@1@'.format(base_id, profile)
|
application_id = '@0@.@1@'.format(base_id, profile)
|
||||||
else
|
elif opt_profile == 'release'
|
||||||
profile = ''
|
profile = ''
|
||||||
version_suffix = ''
|
version_suffix = ''
|
||||||
application_id = base_id
|
application_id = base_id
|
||||||
|
|
|
@ -3,6 +3,7 @@ option(
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
choices: [
|
choices: [
|
||||||
'default',
|
'default',
|
||||||
|
'release',
|
||||||
'development'
|
'development'
|
||||||
],
|
],
|
||||||
value: 'default',
|
value: 'default',
|
||||||
|
|
Loading…
Add table
Reference in a new issue