From ab2876053a6063de237c836ac0226f01e74f1023 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sun, 5 Jan 2020 11:42:15 +0100 Subject: newtype: bump version to 1.0.0 --- conanfile.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'conanfile.py') diff --git a/conanfile.py b/conanfile.py index bebb254..6fcbf48 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,4 +1,17 @@ +import re + from conans import ConanFile, CMake +from conans.tools import load + + +def get_version(): + try: + content = load("CMakeLists.txt") + version = re.search("project\(\"newtype\"\s*VERSION \"(.*)\"", content).group(1) + return version.strip() + except: + return None + class NewtypeConan(ConanFile): name = "newtype" @@ -7,7 +20,7 @@ class NewtypeConan(ConanFile): "url": "https://github.com/fmorgner/newtype.git", "revision": "auto", } - version = "0.0.1" + version = get_version() license = "BSD-3-Clause" url = "https://github.com/fmorgner/newtype" description = "A library of types and functions to create strong type aliases" -- cgit v1.2.3