Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions omego/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from __future__ import print_function
import yaclifw.version
from pkg_resources import resource_string
import os


class Version(yaclifw.version.Version):
Expand All @@ -32,4 +32,10 @@ class Version(yaclifw.version.Version):

def __call__(self, args):
super(yaclifw.version.Version, self).__call__(args)
print(resource_string(__name__, 'RELEASE-VERSION').rstrip())

# print version from RELEASE-VERSION file
base_dir = os.path.dirname(os.path.abspath(__file__))
file_path = os.path.join(base_dir, 'RELEASE-VERSION')
with open(file_path, 'r') as f:
data = f.read()
print(data)
Loading