Skip to content

Commit e2c6ca8

Browse files
committed
refactor: derive the conan version from vpm.json
1 parent 6439b19 commit e2c6ca8

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

conanfile.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import json
2+
import os
3+
14
from conan import ConanFile
25
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
36

47

58
class GrainSegmentationConan(ConanFile):
69
name = "grain-segmentation"
7-
version = "2.0.5"
810
package_type = "static-library"
911
license = "MIT"
1012
settings = "os", "arch", "compiler", "build_type"
@@ -18,8 +20,14 @@ class GrainSegmentationConan(ConanFile):
1820
"spdlog/1.14.1",
1921
"nlohmann_json/3.11.3",
2022
)
23+
exports = "vpm.json"
2124
exports_sources = "CMakeLists.txt", "include/*", "src/*"
2225

26+
def set_version(self):
27+
manifest = os.path.join(self.recipe_folder, "vpm.json")
28+
with open(manifest, encoding="utf-8") as stream:
29+
self.version = json.load(stream)["version"]
30+
2331
def layout(self):
2432
cmake_layout(self)
2533

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"icon": "HiCube",
1616
"author": "Rodolfo Herrera",
1717
"license": "MIT",
18-
"version": "2.0.5",
18+
"version": "2.0.6",
1919
"homepage": "https://github.com/rodyherrera/Volterra",
2020
"description": "Segmenta granos cristalinos a partir de PTM local, mergeando orientaciones similares."
2121
}

vpm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@voltlabs/grain-segmentation",
3-
"version": "2.0.5",
3+
"version": "2.0.6",
44
"kind": "workflow",
55
"publisher": "voltlabs",
66
"description": "Identifies and segments crystalline grains based on local PTM orientations, merging grains with similar orientations.",

0 commit comments

Comments
 (0)