Skip to content

Commit 258304b

Browse files
authored
Merge pull request #116 from olehermanse/master
Prepared python module library for version replacement
2 parents d38eab0 + 085d6ae commit 258304b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

cfbs.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@
154154
"subdirectory": "libraries/python",
155155
"steps": [
156156
"copy cfengine_module_library.py modules/promises/cfengine_module_library.py",
157-
"copy cfengine_module_library.py modules/promises/cfengine.py"
157+
"replace_version 2 0.0.0 modules/promises/cfengine_module_library.py",
158+
"copy cfengine_module_library.py modules/promises/cfengine.py",
159+
"replace_version 2 0.0.0 modules/promises/cfengine.py"
158160
]
159161
},
160162
"maintainers-in-motd": {

libraries/python/cfengine_module_library.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
Currently, this is for implementing custom promise types,
66
but it might be expanded to other types of modules in the future,
77
for example custom functions.
8+
9+
This library is available as a module in CFEngine Build:
10+
11+
https://build.cfengine.com/modules/library-for-promise-types-in-python/
12+
13+
CFEngine Build version: 0.0.0
14+
15+
(If the version number is all zeroes, you are looking at the source. It will
16+
be replaced in a build step when you run cfbs build).
817
"""
918

1019
import sys
@@ -119,7 +128,7 @@ class Result:
119128

120129
class PromiseModule:
121130
def __init__(
122-
self, name="default_module_name", version="0.0.1", record_file_path=None
131+
self, name="default_module_name", version="0.0.0", record_file_path=None
123132
):
124133
self.name = name
125134
self.version = version

0 commit comments

Comments
 (0)