From 085d6ae0a5261e3b41fae2272f4703131d062637 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Mon, 14 Jul 2025 14:50:49 +0200 Subject: [PATCH] Prepared python module library for version replacement Signed-off-by: Ole Herman Schumacher Elgesem --- cfbs.json | 4 +++- libraries/python/cfengine_module_library.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cfbs.json b/cfbs.json index e2641c0..e05a954 100644 --- a/cfbs.json +++ b/cfbs.json @@ -154,7 +154,9 @@ "subdirectory": "libraries/python", "steps": [ "copy cfengine_module_library.py modules/promises/cfengine_module_library.py", - "copy cfengine_module_library.py modules/promises/cfengine.py" + "replace_version 2 0.0.0 modules/promises/cfengine_module_library.py", + "copy cfengine_module_library.py modules/promises/cfengine.py", + "replace_version 2 0.0.0 modules/promises/cfengine.py" ] }, "maintainers-in-motd": { diff --git a/libraries/python/cfengine_module_library.py b/libraries/python/cfengine_module_library.py index 7e07e0f..3e8ddb4 100644 --- a/libraries/python/cfengine_module_library.py +++ b/libraries/python/cfengine_module_library.py @@ -5,6 +5,15 @@ Currently, this is for implementing custom promise types, but it might be expanded to other types of modules in the future, for example custom functions. + +This library is available as a module in CFEngine Build: + +https://build.cfengine.com/modules/library-for-promise-types-in-python/ + +CFEngine Build version: 0.0.0 + +(If the version number is all zeroes, you are looking at the source. It will +be replaced in a build step when you run cfbs build). """ import sys @@ -119,7 +128,7 @@ class Result: class PromiseModule: def __init__( - self, name="default_module_name", version="0.0.1", record_file_path=None + self, name="default_module_name", version="0.0.0", record_file_path=None ): self.name = name self.version = version