This is an automated email from the ASF dual-hosted git repository.

msciabarra pushed a commit to branch image-build
in repository https://gitbox.apache.org/repos/asf/openserverless-task.git

commit e56617b0159339b66a453a59cd1d799bd85d2229
Author: Michele Sciabarra <[email protected]>
AuthorDate: Fri Aug 1 10:21:48 2025 +0200

    image build
---
 ide/deploy/bun.lockb | Bin
 ide/deploy/deploy.js |  11 +++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ide/deploy/bun.lockb b/ide/deploy/bun.lockb
old mode 100755
new mode 100644
diff --git a/ide/deploy/deploy.js b/ide/deploy/deploy.js
index 0e1423e..b1b015f 100644
--- a/ide/deploy/deploy.js
+++ b/ide/deploy/deploy.js
@@ -104,14 +104,21 @@ export function deployAction(artifact) {
   deployPackage(pkg);
 
   let toInspect;
+  let dflags = [];
   if (typ === "zip") {
     const base = artifact.slice(0, -4);
     toInspect = MAINS.map((m) => `${base}/${m}`);
+    dflags =  extractArgs([`${base}/Dockerfile`])
   } else {
     toInspect = [artifact];
   }
 
-  const args = extractArgs(toInspect).join(" ");
+  let flags = extractArgs(toInspect);
+  if(dflags.length > 0) {
+    flags = flags.filter(f => !f.startsWith("--kind")).concat(dflags);
+  }
+
+  const args = flags.join(" ");
   const actionName = `${pkg}/${name}`;
   exec(`$OPS action update ${actionName} ${artifact} ${args}`);
 
@@ -135,7 +142,7 @@ export function deploy(file) {
   // const file = "packages/deploy/multi.zip";
   // const file = "packages/deploy/multi/__main__.py";
   // const file = "packages/deploy/multi/requirements.txt";
-  if (fs.lstatSync(file).isDirectory()) {
+  if (fs.existsSync(`${file}`) && fs.lstatSync(file).isDirectory()) {
     for (const start of MAINS) {
       const sub = `${file}/${start}`;
       if (fs.existsSync(sub)) {

Reply via email to