From 11bd9d782147e883ea10d7a1697e0b97ac681fd0 Mon Sep 17 00:00:00 2001 From: t Date: Thu, 20 Aug 2026 13:13:26 -0600 Subject: Prepare the 0.1.0 release and fix the self-check Add a LICENSE file, point source.url at code.tjp.lol with a v0.1.0 tag, set version 0.1.0-1, and add homepage and labels so the rock can be published to luarocks.org. The self-check hardcoded the rockspec filename, which the version bump broke; find it by glob instead so future releases cannot break it. It also only passes under plain lua: its panto and luv stubs go through package.preload, and the panto interpreter has both loaded already, so the stubs never take effect. The mise check task runs plain lua. Add mise tasks for cutting a version and publishing a release. --- _selfcheck.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to '_selfcheck.lua') diff --git a/_selfcheck.lua b/_selfcheck.lua index b4d0396..8b83fa5 100644 --- a/_selfcheck.lua +++ b/_selfcheck.lua @@ -1,7 +1,20 @@ local events = {} local reports = {} -assert(loadfile("panto-herdr-scm-1.rockspec")) +-- Find the rockspec rather than naming it: the filename carries the version, +-- so hardcoding it breaks this check on every release. +-- +-- Deliberately shells out instead of using luv: the stubs below replace +-- `package.preload.luv`, and a `require("luv")` up here would cache the real +-- module first and quietly defeat them. +local function find_rockspec() + local ls = assert(io.popen("ls -1 ./*.rockspec 2>/dev/null")) + local name = ls:read("l") + ls:close() + return name +end + +assert(loadfile(assert(find_rockspec(), "no .rockspec in the repo root"))) package.preload.panto = function() return { -- cgit v1.3