From bd91522bacde8b7c26d6176cd85e70d97ba44afc Mon Sep 17 00:00:00 2001
From: Dmitry Rodionov <d.rodionov@picodata.io>
Date: Thu, 24 Oct 2024 19:40:50 +0300
Subject: [PATCH] chore: avoid need to update version in luamod every release

---
 src/luamod.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/luamod.rs b/src/luamod.rs
index 44dcfc8035..c015903e85 100644
--- a/src/luamod.rs
+++ b/src/luamod.rs
@@ -26,6 +26,7 @@ use ::tarantool::tlua::{LuaState, LuaThread, PushOneInto, Void};
 use ::tarantool::transaction::transaction;
 use ::tarantool::tuple::Decode;
 use ::tarantool::vclock::Vclock;
+use indoc::formatdoc;
 use indoc::indoc;
 use std::time::Duration;
 
@@ -55,7 +56,7 @@ pub(crate) fn setup() {
     luamod_set(
         &l,
         "PICODATA_VERSION",
-        indoc! {"
+        &formatdoc! {"
         pico.PICODATA_VERSION
         =====================
 
@@ -69,13 +70,12 @@ pub(crate) fn setup() {
 
             picodata> pico.PICODATA_VERSION
             ---
-            - 24.6.0
+            - {version}
             ...
-        "},
-        {
-            const _: () = assert!(str_eq(env!("CARGO_PKG_VERSION"), "24.6.0"));
-            crate::info::PICODATA_VERSION
+        ",
+        version = env!("CARGO_PKG_VERSION")
         },
+        crate::info::PICODATA_VERSION,
     );
 
     luamod_set(
-- 
GitLab