Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update on_run.lua #48

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/scripts/tasks/smart-rootfs/on_run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ function deploy_package(rootfs)
local requireinfo = instance:requireinfo()
local repo = instance:repo()
local packagename = requireinfo.originstr
local packageversion = requireinfo.version
local installdir = instance:installdir()
local repodir = repo:url()
local reponame = repo:name()
if(packageversion ~= "latest") then
packagename = string.match(packagename,"%S+")
end
local deploy_script =
path.join(repodir, "packages", packagename:sub(1, 1), packagename, "scripts", "deploy.lua")
if os.isfile(deploy_script) then
Expand All @@ -91,10 +95,14 @@ function export_package_to_sdkdir(sdkdir)
for _, instance in ipairs(package.load_packages(requires, {requires_extra = requires_extra})) do
local requireinfo = instance:requireinfo()
local packagename = requireinfo.originstr
local packageversion = requireinfo.version
local repo = instance:repo()
local repodir = repo:url()
local reponame = repo:name()
local installdir = instance:installdir()
if(packageversion ~= "latest") then
packagename = string.match(packagename,"%S+")
end
local export_script =
path.join(repodir, "packages", packagename:sub(1, 1), packagename, "scripts", "export.lua")
if os.isfile(export_script) then
Expand Down