Skip to content

Commit bebdafb

Browse files
committed
Moved cf-remote version string to a single file
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent f0dc33f commit bebdafb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

cf_remote/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44

55
from cf_remote import log
6+
from cf_remote import version
67
from cf_remote import commands, paths
78
from cf_remote.utils import user_error, exit_success, expand_list_from_file, is_file_string
89
from cf_remote.utils import strip_user, read_json, is_package_url
@@ -11,7 +12,7 @@
1112

1213

1314
def print_version_info():
14-
print("cf-remote version 0.1.4")
15+
print(f"cf-remote version {version.string()}")
1516
print("Available CFEngine versions:")
1617
releases = Releases()
1718
print(releases)

cf_remote/version.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def string():
2+
return "0.1.4"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import setuptools
2+
from cf_remote import version
23

34
with open("README.md", "r", encoding="utf-8") as fh:
45
long_description = fh.read()
56

67
setuptools.setup(
78
name="cf-remote",
8-
version="0.1.4",
9+
version=f"{version.string()}",
910
author="Northern.tech, Inc.",
1011
author_email="contact@northern.tech",
1112
description="Tooling to deploy CFEngine (and much more)",

0 commit comments

Comments
 (0)