aboutsummaryrefslogtreecommitdiff
path: root/src/lua_state.c
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-05-25 09:26:59 +0000
committerdacctal <dacctal@symlinx.net>2026-05-25 09:26:59 +0000
commit1586b05a45c28212b81c7ef09ec3ebb69cc80319 (patch)
treeed46425a8d8df6c7e7deb37532490f2af7ed1419 /src/lua_state.c
parent2dea5bc2ad4281042758f0e9bfe98fa96bc89412 (diff)
declare permanent version numbers in repos
Diffstat (limited to 'src/lua_state.c')
-rw-r--r--src/lua_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua_state.c b/src/lua_state.c
index 6d3d023..24a9db6 100644
--- a/src/lua_state.c
+++ b/src/lua_state.c
@@ -193,6 +193,10 @@ void cache_repos() {
const char *url = lua_tostring(L, -1);
repo->source_value = url ? strdup(url) : strdup("");
lua_pop(L, 1);
+ lua_getfield(L, -1, "version");
+ const char* version = lua_tostring(L, -1);
+ repo->version = version ? strdup(version) : strdup("HEAD");
+ lua_pop(L, 1);
lua_getfield(L, -1, "dependencies");
if (!lua_istable(L, -1)) {
lua_pop(L, 2);