Skip to content

Commit

Permalink
Introduce proper versioning and bump version number
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Breker <robert.breker@citrix.com>
  • Loading branch information
Robert Breker committed Apr 15, 2021
1 parent 73a03db commit 3a86f10
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cxcli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.1.2"
5 changes: 4 additions & 1 deletion cxcli/clidriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import re
import sys

from . import __version__
from . import syncspecs

console = Console()
Expand Down Expand Up @@ -651,7 +652,9 @@ def main():


def _main():
parser = argparse.ArgumentParser(description="cx - CLI for Citrix Cloud")
parser = argparse.ArgumentParser(
description=f"cx {__version__} - CLI for Citrix Cloud"
)
parser.add_argument(
"--verbose", help="increase output verbosity", action="store_true"
)
Expand Down
2 changes: 1 addition & 1 deletion cxcli/syncspecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def fetch_portal_specs_from_sitedata(sitedata, specsdict={}):
specfilename = "wem"
elif specfilename == "globalappconfigurationservice":
specfilename = "globalappconfiguration"
specfilename = specfilename.replace('citrixcloud-', '')
specfilename = specfilename.replace("citrixcloud-", "")
specsdict[specfilename] = URL + sitedata["apis"]
for _, value in sitedata.items():
specsdict = fetch_portal_specs_from_sitedata(value, specsdict)
Expand Down
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#!/usr/bin/env python3

import os
import setuptools

def get_version():
here = os.path.abspath(os.path.dirname(__file__))
with open("cxcli/__init__.py", "r") as fp:
file_content = fp.readlines()
for line in file_content:
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split('"')[1]


with open("requirements.txt") as f:
required = f.read().splitlines()

Expand All @@ -10,7 +21,7 @@

setuptools.setup(
name="cxcli",
version="0.1.1",
version=get_version(),
author="Robert Breker",
author_email="",
description="Experimental CLI for Citrix Cloud",
Expand Down

0 comments on commit 3a86f10

Please sign in to comment.