build: Set flatpak version the same as in-app version

This commit is contained in:
Kévin Commaille 2023-04-29 14:52:35 +02:00
parent ec02e35b45
commit f7dfbcceda
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
3 changed files with 14 additions and 1 deletions

View file

@ -26,9 +26,20 @@ if desktop_file_validate.found()
endif
# Appdata
if is_release
development_release = ''
else
development_release = '''
<release version="@0@" type="development" date="@1@">
<description>
<p>Development release.</p>
</description>
</release>'''.format(version.replace('-', '~'), release_date)
endif
appdata_conf = configuration_data()
appdata_conf.set('app-id', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_conf.set('development-release', development_release)
appdata_file = i18n.merge_file(
input: configure_file(
input: '@0@.metainfo.xml.in.in'.format(base_id),

View file

@ -50,7 +50,7 @@
<content_attribute id="social-audio">intense</content_attribute>
</content_rating>
<releases>
<releases>@development-release@
<release version="5~alpha1" type="development" date="2022-09-25" urgency="high">
<description>
<p>Fractal 5.alpha1 is the first release since Fractal has been

View file

@ -66,6 +66,7 @@ endif
if is_release
version = base_version
release_date = '' # should be unused with released versions
application_id = base_id
else
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
@ -74,6 +75,7 @@ else
else
version = '@0@-@1@'.format(base_version, vcs_tag)
endif
release_date = run_command('git', 'show', '-s', '--format=%cI').stdout().strip()
application_id = '@0@.@1@'.format(base_id, profile)
endif