Skip to content

Commit 78d0fbd

Browse files
garyoclaude
andcommitted
Fix stale 1.4.0 version: bump to 1.5.1, derive conan version from CMake
Both the CMake project() version and the conan recipe still said 1.4.0, two releases behind. Bump CMakeLists.txt to 1.5.1 and make the conan recipe read its version from the project() VERSION via set_version(), so future release bumps happen in one place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
1 parent 71ebff4 commit 78d0fbd

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.16.0)
22
if(OFX_SUPPORTS_CUDARENDER AND NOT APPLE)
33
project(
44
openfx
5-
VERSION 1.4.0
5+
VERSION 1.5.1
66
LANGUAGES CXX CUDA)
77
else()
88
project(
99
openfx
10-
VERSION 1.4.0
10+
VERSION 1.5.1
1111
LANGUAGES CXX) # no CUDA
1212
endif()
1313
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

conanfile.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from conan import ConanFile
22
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
3-
from conan.tools.files import copy, collect_libs
3+
from conan.tools.files import copy, collect_libs, load
44
import os.path
5+
import re
56

67
required_conan_version = ">=1.59.0"
78

89
class openfx(ConanFile):
910
name = "openfx"
10-
version = "1.4.0"
1111
license = "BSD-3-Clause"
1212
url = "https://github.com/AcademySoftwareFoundation/openfx"
1313
description = "OpenFX image processing plug-in standard"
@@ -25,6 +25,11 @@ class openfx(ConanFile):
2525
"install.md"
2626
)
2727

28+
def set_version(self):
29+
# Single source of truth: the project() VERSION in CMakeLists.txt.
30+
cmakelists = load(self, os.path.join(self.recipe_folder, "CMakeLists.txt"))
31+
self.version = re.search(r"^\s*VERSION\s+([0-9.]+)", cmakelists, re.MULTILINE).group(1)
32+
2833
settings = "os", "arch", "compiler", "build_type"
2934
options = {
3035
"build_examples": [True, False],

0 commit comments

Comments
 (0)