1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-03 17:59:19 +02:00

Hardcode version

This commit is contained in:
jikstra 2019-05-18 15:32:16 +02:00 committed by Floris Bruynooghe
parent 0c54f8bd76
commit 17efce0ec8

View file

@ -1,36 +1,14 @@
project( project(
'deltachat-core', 'c', 'deltachat-core', 'c',
license: 'GPLv3', license: 'GPLv3',
version: '0.0.0', # Dummy, see below. version: '0.43.0',
subproject_dir: 'libs', subproject_dir: 'libs',
meson_version: '>=0.47.2', meson_version: '>=0.47.2',
default_options: ['c_std=gnu99'], default_options: ['c_std=gnu99'],
) )
## Figure out the version, use this instead of meson.project_version()
# The version schema is:
# - X.Y.Z for tagged releases.
# - X.Y.Z990N for dev releases.
# Where N is the number of commits since the last tag.
version = meson.project_version() version = meson.project_version()
git = find_program('git', required: false)
if git.found()
git_desc = run_command(git, 'describe', '--tags', '--match=v*')
if git_desc.returncode() == 0
git_desc_parts = git_desc.stdout().strip().split('-')
version = git_desc_parts[0].split('v')[1]
if git_desc_parts.length() > 1
version_parts = version.split('.')
version = '.'.join([version_parts[0],
version_parts[1],
version_parts[2] + '990' + git_desc_parts[1]])
endif
endif
endif
if version == meson.project_version()
warning('Git version not found, using (dummy) project version')
endif
# pthreads is not a real dependency # pthreads is not a real dependency