diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2020-01-05 11:42:15 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2020-01-05 11:44:26 +0100 |
| commit | ab2876053a6063de237c836ac0226f01e74f1023 (patch) | |
| tree | 033e371638ffac398df00f72493b2351e12b73e8 | |
| parent | 6dd5aa208b6ab7f118f4c7ce48b3bb071befb294 (diff) | |
| download | newtype-ab2876053a6063de237c836ac0226f01e74f1023.tar.xz newtype-ab2876053a6063de237c836ac0226f01e74f1023.zip | |
newtype: bump version to 1.0.0
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | conanfile.py | 15 | ||||
| -rw-r--r-- | include/newtype/version.hpp | 23 |
3 files changed, 38 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1624dce..275877a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION "3.9.0") project("newtype" - VERSION "0.0.1" + VERSION "1.0.0" LANGUAGES CXX DESCRIPTION "A library of types and functions to create strong type aliases" ) 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" diff --git a/include/newtype/version.hpp b/include/newtype/version.hpp new file mode 100644 index 0000000..c7c3314 --- /dev/null +++ b/include/newtype/version.hpp @@ -0,0 +1,23 @@ +#ifndef NEWTYPE_VERSION_HPP +#define NEWTYPE_VERSION_HPP + +namespace nt +{ + + constexpr struct + { + int const major; + int const minor; + int const patch; + + char const * const name; + } version{ + .major = 1, + .minor = 0, + .patch = 0, + .name = "Francesca", + }; + +} // namespace nt + +#endif
\ No newline at end of file |
