Fix conan package version
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
"conan": {}
|
"conan": {}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"build_Debug/build/Debug/generators/CMakePresets.json"
|
"build_Debug/build/Debug/generators/CMakePresets.json",
|
||||||
|
"build/Release/generators/CMakePresets.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
12
conanfile.py
12
conanfile.py
@@ -6,7 +6,7 @@ from conan.tools.cmake import cmake_layout
|
|||||||
|
|
||||||
class FoldingConan(ConanFile):
|
class FoldingConan(ConanFile):
|
||||||
name = "folding"
|
name = "folding"
|
||||||
version = "X.X.X"
|
version = "1.1.1"
|
||||||
description = "K-Fold and stratified K-Fold header-only library"
|
description = "K-Fold and stratified K-Fold header-only library"
|
||||||
url = "https://github.com/rmontanana/folding"
|
url = "https://github.com/rmontanana/folding"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@@ -30,16 +30,6 @@ class FoldingConan(ConanFile):
|
|||||||
def layout(self):
|
def layout(self):
|
||||||
cmake_layout(self)
|
cmake_layout(self)
|
||||||
|
|
||||||
def init(self):
|
|
||||||
# Read the CMakeLists.txt file to get the version
|
|
||||||
with open("folding.hpp", "r") as f:
|
|
||||||
content = f.read()
|
|
||||||
match = re.search(
|
|
||||||
r'const std::string FOLDING_VERSION = "([^"]+)";', content
|
|
||||||
)
|
|
||||||
if match:
|
|
||||||
self.version = match.group(1)
|
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
copy(self, "*.hpp", src=self.source_folder, dst=self.package_folder)
|
copy(self, "*.hpp", src=self.source_folder, dst=self.package_folder)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user