aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconf.lua2
-rwxr-xr-xmake-feed.lua22
2 files changed, 15 insertions, 9 deletions
diff --git a/conf.lua b/conf.lua
index ee08eaa..8c3f2fb 100755
--- a/conf.lua
+++ b/conf.lua
@@ -31,7 +31,7 @@ local conf = {
-- the same as the macros table, but for modules.
fileBaseUrl = "@{fileBaseUrl}/modules/@{namespacePath}",
ignoreCondition = module_ignore,
- -- module ignoreConditions are passed the DependencyControl version record the module defines.
+ -- module ignoreConditions are passed a similar table of details.
},
fileUrl = "@{fileBaseUrl}@{fileName}", -- used as the `url` value in the files section of a macro/module. Where the actual file is.
channel = "master" -- the default (and only) channel defined in the files section. It doesn't really matter what you put here.
diff --git a/make-feed.lua b/make-feed.lua
index e79500c..044a40b 100755
--- a/make-feed.lua
+++ b/make-feed.lua
@@ -198,10 +198,6 @@ local function get_macro_metadata(file)
local macro = run_file(file, meta.extension)
if macro == nil then return nil end
- if config.macros.ignoreCondition(macro) then
- err(file .. ": ignored by config, skipping")
- return nil
- end
meta.name = macro.script_name
meta.description = macro.script_description
meta.version = macro.script_version
@@ -209,6 +205,12 @@ local function get_macro_metadata(file)
meta.namespace = macro.script_namespace
meta.changelog = macro.script_changelog
meta.depctrl = macro.__feedmaker_version
+
+ if config.macros.ignoreCondition(meta) then
+ err(file .. ": ignored by config, skipping")
+ return nil
+ end
+ err(meta)
return meta
end
@@ -221,16 +223,19 @@ local function get_module_metadata(file)
local mod = run_file(file, meta.extension)
if mod == nil then return nil end
- if config.modules.ignoreCondition(mod) then
- err(file .. ": ignored by config, skipping")
- return nil
- end
+
local depctrl = mod.__feedmaker_version
meta.name = depctrl.name
meta.version = depctrl.version
meta.author = depctrl.author
meta.namespace = depctrl.moduleName
meta.depctrl = depctrl[1]
+
+ if config.modules.ignoreCondition(meta) then
+ err(file .. ": ignored by config, skipping")
+ return nil
+ end
+
return meta
end
@@ -291,6 +296,7 @@ local function make_feed(meta)
for _, script in ipairs(meta.modules) do
local mod, feeds = get_feed_entry(script, config.modules.fileBaseUrl)
feed.knownFeeds = join_ktables(feed.knownFeeds, feeds)
+ err(script)
feed.modules[script.namespace] = mod
end
end