Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
Hardcode version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikstra authored and flub committed May 18, 2019
1 parent 0c54f8b commit 17efce0
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,36 +1,14 @@
project(
'deltachat-core', 'c',
license: 'GPLv3',
version: '0.0.0', # Dummy, see below.
version: '0.43.0',
subproject_dir: 'libs',
meson_version: '>=0.47.2',
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()
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
Expand Down

0 comments on commit 17efce0

Please sign in to comment.