aboutsummaryrefslogtreecommitdiffstats
path: root/make-feed.lua
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2022-11-20 04:24:02 +0000
committergarret <garret@airmail.cc>2022-11-20 04:25:58 +0000
commitda95c4ee8f19759c08183f3111f79c5e96e25dbe (patch)
treee9f7cac2b5e5cde17a881947b8f9684baacbae70 /make-feed.lua
parente63ed7cb5338311bd4b59fe74240ef14f411c2a2 (diff)
downloaddepctrl-feedmaker-da95c4ee8f19759c08183f3111f79c5e96e25dbe.tar.gz
depctrl-feedmaker-da95c4ee8f19759c08183f3111f79c5e96e25dbe.tar.bz2
depctrl-feedmaker-da95c4ee8f19759c08183f3111f79c5e96e25dbe.zip
feedmaker: metadata getter: move what i can to before the loadfile()
nothing is sacred after that point no sense in risking stuff changing when i could just move it up a bit
Diffstat (limited to 'make-feed.lua')
-rwxr-xr-xmake-feed.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/make-feed.lua b/make-feed.lua
index 8cbc58b..07f3609 100755
--- a/make-feed.lua
+++ b/make-feed.lua
@@ -74,6 +74,8 @@ local function get_metadata(file)
-- having all those nils in the table doesn't really do anything in terms of functionality, but it lets me see what i need to put in it
meta.filename = file
+ meta.sha1 = sha1.sha1(readfile(file))
+ meta.release = get_iso8601_date(lfs.attributes(file, "modification"))
loadfile(file)()
-- script_name etc are now in our global scope
@@ -84,8 +86,6 @@ local function get_metadata(file)
meta.author = script_author
meta.namespace = script_namespace
meta.depctrl = __feedmaker_version
- meta.sha1 = sha1.sha1(readfile(file))
- meta.release = get_iso8601_date(lfs.attributes(file, "modification"))
return meta
end