patch: hooks from zeta
This commit is contained in:
@@ -11,6 +11,7 @@ local recipe = require("recipe")
|
||||
local builder = require("builder")
|
||||
local packager = require("packager")
|
||||
local indexer = require("indexer")
|
||||
local hooks = require("hooks")
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- Dependency resolution (--follow)
|
||||
@@ -118,6 +119,8 @@ function build.single(recipe_path, opts)
|
||||
|
||||
builder.run_build(r, source_dir, stage_dir, { jobs = opts.jobs })
|
||||
|
||||
local hook_paths = hooks.scan_hooks(stage_dir)
|
||||
|
||||
if r.test then
|
||||
builder.run_test(r.test, stage_dir)
|
||||
else
|
||||
@@ -126,7 +129,7 @@ function build.single(recipe_path, opts)
|
||||
|
||||
local tarball_path = path.join(pkg_dir, r.name .. "-" .. r.version .. ".tar.gz")
|
||||
local sha256 = packager.create_tarball(stage_dir, tarball_path)
|
||||
packager.write_manifest(r, sha256, pkg_dir, opts.repo)
|
||||
packager.write_manifest(r, sha256, pkg_dir, opts.repo, hook_paths)
|
||||
|
||||
if not opts.no_index then
|
||||
indexer.generate(packages_dir)
|
||||
|
||||
Reference in New Issue
Block a user