summaryrefslogtreecommitdiffstats
path: root/library/python/svn_version
diff options
context:
space:
mode:
Diffstat (limited to 'library/python/svn_version')
-rw-r--r--library/python/svn_version/__init__.py4
-rw-r--r--library/python/svn_version/__svn_version.pyx8
-rw-r--r--library/python/svn_version/ut/test_simple.py8
3 files changed, 20 insertions, 0 deletions
diff --git a/library/python/svn_version/__init__.py b/library/python/svn_version/__init__.py
index b5c05d6bc06..8de108e6e69 100644
--- a/library/python/svn_version/__init__.py
+++ b/library/python/svn_version/__init__.py
@@ -9,6 +9,8 @@ from .__svn_version import (
patch_number,
vcs,
svn_timestamp,
+ custom_version,
+ release_version,
)
__all__ = (
@@ -22,4 +24,6 @@ __all__ = (
'patch_number',
'vcs',
'svn_timestamp',
+ 'custom_version',
+ 'release_version',
)
diff --git a/library/python/svn_version/__svn_version.pyx b/library/python/svn_version/__svn_version.pyx
index 8d119e7f0b4..387c445ea7a 100644
--- a/library/python/svn_version/__svn_version.pyx
+++ b/library/python/svn_version/__svn_version.pyx
@@ -11,6 +11,8 @@ cdef extern from "library/cpp/svnversion/svnversion.h":
cdef const char* GetTag() except +;
cdef int GetArcadiaPatchNumber() except +;
cdef int GetProgramBuildTimestamp() except +;
+ cdef const char* GetCustomVersion() except +;
+ cdef const char* GetReleaseVersion() except +;
def svn_version():
return fu.bytes_to_native_str(GetProgramSvnVersion())
@@ -41,3 +43,9 @@ def patch_number():
def vcs():
return fu.bytes_to_native_str(GetVCS())
+
+def custom_version():
+ return fu.bytes_to_native_str(GetCustomVersion())
+
+def release_version():
+ return fu.bytes_to_native_str(GetReleaseVersion())
diff --git a/library/python/svn_version/ut/test_simple.py b/library/python/svn_version/ut/test_simple.py
index 50fa78f55d8..4c6aa58e435 100644
--- a/library/python/svn_version/ut/test_simple.py
+++ b/library/python/svn_version/ut/test_simple.py
@@ -22,3 +22,11 @@ def test_simple():
assert len(sv.commit_id()) > 0
assert isinstance(sv.hash(), str)
assert isinstance(sv.patch_number(), int)
+
+
+def test_custom_version():
+ assert isinstance(sv.custom_version(), str)
+
+
+def test_release_version():
+ assert isinstance(sv.release_version(), str)