feat: --follow for deps and a custom example

--follow now follows the deptree of the definition
--follow is incompatible with --all
build_system = "custom" example with build.sh
This commit is contained in:
2026-08-07 15:17:47 -04:00
parent a42001b9d8
commit 159f7bfe83
5 changed files with 150 additions and 3 deletions
+10
View File
@@ -75,6 +75,8 @@ Flags:
-w, --workers <N> Number of parallel package builds for --all (default: 1)
--no-index Don't update packages/index.lua after building
--keep-work Don't remove the build work directory
--follow Build all dependencies first (bottom-up), then the package.
Incompatible with --all.
--force Overwrite existing package tarball
--help Show this help
@@ -101,6 +103,7 @@ local function parse_cli(args)
force = false,
index = false,
all = nil,
follow = false,
help = false,
recipe = nil,
jobs = nil, -- nil = auto-detect (nproc)
@@ -142,6 +145,8 @@ local function parse_cli(args)
opts.keep_work = true
elseif a == "--force" then
opts.force = true
elseif a == "--follow" then
opts.follow = true
elseif a == "--jobs" then
i = i + 1
if i > #args then
@@ -217,6 +222,11 @@ if opts.help then
os.exit(0)
end
if opts.follow and opts.all then
io.stderr:write("error: --follow and --all are incompatible\n")
os.exit(1)
end
if opts.index then
indexer.generate(path.join(opts.output, "packages"))
elseif opts.all then