sandbox.cpp.in 713 B

123456789101112131415161718192021222324252627
  1. #include <library/cpp/build_info/sandbox.h>
  2. #include <library/cpp/string_utils/base64/base64.h>
  3. #include <util/generic/string.h>
  4. #include <util/string/subst.h>
  5. extern "C" const char* GetSandboxTaskId() {
  6. return "@SANDBOX_TASK_ID@";
  7. }
  8. class TKosherVersionHolder {
  9. public:
  10. const char* Version() const {
  11. if (!Version_) {
  12. TString version = "@KOSHER_SVN_VERSION@";
  13. SubstGlobal(version, ".", "=");
  14. Version_ = Base64Decode(version);
  15. }
  16. return Version_.c_str();
  17. }
  18. private:
  19. mutable TString Version_;
  20. };
  21. // Experimental code for RMDEV-365
  22. extern "C" const char* GetKosherSvnVersion() {
  23. return Singleton<TKosherVersionHolder>()->Version();
  24. }