diff options
| author | t <t@tjp.lol> | 2026-08-20 13:13:26 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-08-20 13:39:40 -0600 |
| commit | 11bd9d782147e883ea10d7a1697e0b97ac681fd0 (patch) | |
| tree | c22c8111f8d57604dc6f1196a955fa27746e46a6 /_selfcheck.lua | |
| parent | 2acd6b0e38e4af1fd13bad1cef8af7407b20684c (diff) | |
Prepare the 0.1.0 release and fix the self-checkv0.1.0
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.
Diffstat (limited to '_selfcheck.lua')
| -rw-r--r-- | _selfcheck.lua | 15 |
1 files changed, 14 insertions, 1 deletions
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 { |
