From f1411b78348903f8de1bf13a02121b3f8fe3b819 Mon Sep 17 00:00:00 2001 From: garret Date: Wed, 22 Feb 2023 00:39:33 +0000 Subject: hack to make depctrl version grabbing actually work i thought setting a global in fake depctrl would set it in the script's environment, not feedmaker's this seems to not be the case --- make-feed.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'make-feed.lua') diff --git a/make-feed.lua b/make-feed.lua index 370c6a7..18cb355 100755 --- a/make-feed.lua +++ b/make-feed.lua @@ -271,7 +271,6 @@ local function run_file(file, extension) require = sandbox_require, aegisub = fake_aegisub(), - _feedmaker_version = {} } if extension == "moon" then @@ -294,6 +293,8 @@ local function get_macro_metadata(file) meta.sha1, meta.release = get_file_metadata(file) meta.basename, meta.extension = split_filename(file) + __feedmaker_version = nil + function include() end -- so it doesnt die with karaskel imports and such local macro = run_file(file, meta.extension) @@ -305,7 +306,7 @@ local function get_macro_metadata(file) meta.author = macro.script_author meta.namespace = macro.script_namespace meta.changelog = macro.script_changelog - meta.depctrl = macro.__feedmaker_version + meta.depctrl = __feedmaker_version if not meta.namespace then err(file .. ": no script_namespace, skipping") -- cgit v1.2.3-70-g09d2