aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/src/version.cpp
diff options
context:
space:
mode:
authorqrort <qrort@yandex-team.com>2022-11-30 23:47:12 +0300
committerqrort <qrort@yandex-team.com>2022-11-30 23:47:12 +0300
commit22f8ae0e3f5d68b92aecccdf96c1d841a0334311 (patch)
treebffa27765faf54126ad44bcafa89fadecb7a73d7 /library/cpp/tvmauth/src/version.cpp
parent332b99e2173f0425444abb759eebcb2fafaa9209 (diff)
downloadydb-22f8ae0e3f5d68b92aecccdf96c1d841a0334311.tar.gz
validate canons without yatest_common
Diffstat (limited to 'library/cpp/tvmauth/src/version.cpp')
-rw-r--r--library/cpp/tvmauth/src/version.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/library/cpp/tvmauth/src/version.cpp b/library/cpp/tvmauth/src/version.cpp
new file mode 100644
index 0000000000..6b389213d0
--- /dev/null
+++ b/library/cpp/tvmauth/src/version.cpp
@@ -0,0 +1,26 @@
+#include <library/cpp/resource/resource.h>
+
+#include <util/string/strip.h>
+
+namespace {
+ class TBuiltinVersion {
+ public:
+ TBuiltinVersion() {
+ Version_ = NResource::Find("/builtin/version");
+ StripInPlace(Version_);
+ }
+
+ TStringBuf Get() const {
+ return Version_;
+ }
+
+ private:
+ TString Version_;
+ };
+}
+
+namespace NTvmAuth {
+ TStringBuf LibVersion() {
+ return Singleton<TBuiltinVersion>()->Get();
+ }
+}