meson: Make sure everything works without a pre-release version
This commit is contained in:
parent
b64f1dced2
commit
78aaef60ff
3 changed files with 16 additions and 14 deletions
|
@ -29,18 +29,18 @@ endif
|
|||
if is_release
|
||||
development_release = ''
|
||||
else
|
||||
release_version = major_version + '~'
|
||||
appstream_version = major_version + '~'
|
||||
if pre_release_version != ''
|
||||
release_version += pre_release_version + '-'
|
||||
appstream_version += pre_release_version + '-'
|
||||
endif
|
||||
release_version += devel_version
|
||||
appstream_version += devel_version
|
||||
|
||||
development_release = '''
|
||||
<release version="@0@" type="development" date="@1@">
|
||||
<description>
|
||||
<p>Development release.</p>
|
||||
</description>
|
||||
</release>'''.format(release_version, release_date)
|
||||
</release>'''.format(appstream_version, release_date)
|
||||
endif
|
||||
appdata_conf = configuration_data()
|
||||
appdata_conf.set('app-id', application_id)
|
||||
|
|
12
meson.build
12
meson.build
|
@ -87,9 +87,19 @@ else
|
|||
application_id = '@0@.@1@'.format(base_id, profile)
|
||||
endif
|
||||
|
||||
version = major_version
|
||||
if pre_release_version != ''
|
||||
version += '.' + pre_release_version
|
||||
endif
|
||||
|
||||
full_version = version
|
||||
if devel_version != ''
|
||||
version += '-' + devel_version
|
||||
endif
|
||||
|
||||
meson.add_dist_script(
|
||||
'build-aux/dist-vendor.sh',
|
||||
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + major_version + '.' + pre_release_version,
|
||||
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + version,
|
||||
meson.project_source_root()
|
||||
)
|
||||
|
||||
|
|
|
@ -7,19 +7,11 @@ ui_resources = gnome.compile_resources(
|
|||
install_dir: pkgdatadir,
|
||||
)
|
||||
|
||||
version = major_version
|
||||
if pre_release_version != ''
|
||||
version += '.' + pre_release_version
|
||||
endif
|
||||
if devel_version != ''
|
||||
version += '-' + devel_version
|
||||
endif
|
||||
|
||||
global_conf = configuration_data()
|
||||
global_conf.set_quoted('APP_ID', application_id)
|
||||
global_conf.set_quoted('PKGDATADIR', pkgdatadir)
|
||||
global_conf.set('PROFILE', profile)
|
||||
global_conf.set_quoted('VERSION', version)
|
||||
global_conf.set_quoted('VERSION', full_version)
|
||||
global_conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
|
||||
global_conf.set_quoted('LOCALEDIR', localedir)
|
||||
config = configure_file(
|
||||
|
|
Loading…
Reference in a new issue