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

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

commit d2d36e1a59337544f61b63c48574d074c754826f
Author: Michele Sciabarra <[email protected]>
AuthorDate: Sun Nov 9 07:45:06 2025 +0000

    trim whitespaces
---
 ide/docopts.md   |  6 ++++--
 ide/opsfile.yml  | 39 +++++++++++++++++++++++++++------------
 util/docopts.md  |  2 ++
 util/opsfile.yml |  6 ++++++
 4 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/ide/docopts.md b/ide/docopts.md
index fd1b68f..5bc22b2 100644
--- a/ide/docopts.md
+++ b/ide/docopts.md
@@ -26,7 +26,7 @@ OpenServerless Ide Development Utilities.
 Usage:
     ide login [<username>] [<apihost>]
     ide devel [--fast] [--dry-run]
-    ide deploy [<action>] [--dry-run]
+    ide deploy [<action>|--packages|--web] [--dry-run]
     ide undeploy [<action>] [--dry-run]
     ide clean
     ide setup 
@@ -60,6 +60,8 @@ Usage:
 ## Options
 
 ```
---fast          Skip the initial deployment step and go in incremental update 
mode
 --dry-run       Simulates the execution without making any actual changes 
+--packages      Only deploy packages, skip web upload
+--web           Only deploy web folder, skip packages
+--fast          Skip the initial deployment step and go in incremental update 
mode
 ```
diff --git a/ide/opsfile.yml b/ide/opsfile.yml
index d518cad..cb4c075 100644
--- a/ide/opsfile.yml
+++ b/ide/opsfile.yml
@@ -226,22 +226,40 @@ tasks:
         fi
         if test -n "$AUTH_CHECK"
         then if test "$AUTH_CHECK" != "$AUTH" 
-             then echo "WARNING: wrong deploy! You are logged in a different 
user than your configured AUTH_CHECK" ; exit 1
+             then echo "WARNING: wrong deploy! You are logged in a different 
user than your pinned one and configured in .env as AUTH_CHECK" ; exit 1
              fi
         fi
+
         if {{.__dry_run}}
         then DRY="--dry-run" ; ECHO='echo'
         else DRY="" ; ECHO=""
         fi
-        if test -z "{{._action_}}"
-        then
-            bun {{.TASKFILE_DIR}}/deploy/index.js "$OPS_PWD" -d $DRY
-            OPS_UPLOAD_FOLDER=`bun {{.TASKFILE_DIR}}/deploy/info.js upload web`
-            echo "UPLOAD ASSETS FROM ${OPS_UPLOAD_FOLDER}"
-            $ECHO $OPS util upload ${OPS_UPLOAD_FOLDER:-web}
-            echo "URL: $OPSDEV_HOST"
+
+        if {{.__web}}
+        then deploy_packages=""
+        else deploy_packages="1"
+        fi
+
+        if {{.__packages}}
+        then deploy_web=""
+        else deploy_web="1"
+        fi
+
+        if test -n "{{._action_}}"
+        then 
+            bun {{.TASKFILE_DIR}}/deploy/index.js "$OPS_PWD" -s 
"{{._action_}}" $DRY  
         else
-            bun {{.TASKFILE_DIR}}/deploy/index.js "$OPS_PWD" -s 
"{{._action_}}" $DRY            
+            if [ -n "$deploy_packages"]
+            then 
+                bun {{.TASKFILE_DIR}}/deploy/index.js "$OPS_PWD" -d $DRY
+            fi
+            if [-n "$deploy_web"]
+            then
+              OPS_UPLOAD_FOLDER=`bun {{.TASKFILE_DIR}}/deploy/info.js upload 
web`
+              echo "UPLOAD ASSETS FROM ${OPS_UPLOAD_FOLDER}"
+              $ECHO $OPS util upload ${OPS_UPLOAD_FOLDER:-web}
+              echo "URL: $OPSDEV_HOST"
+            fi
         fi
 
   undeploy:
@@ -254,7 +272,6 @@ tasks:
         then DRY="--dry-run"
         else DRY=""
         fi
-
         # Check if an action argument is provided
         if test -n "{{._action_}}"
         then
@@ -288,7 +305,6 @@ tasks:
         else die "no packages in current directory"
         fi
 
-
   devel:
     interactive: true
     silent: true
@@ -333,7 +349,6 @@ tasks:
         bun {{.TASKFILE_DIR}}/deploy/index.js "$OPS_PWD" -w $FAST $DRY
         true
 
-
   shell:
     desc: open a bash shell with the current environment
     interactive: true
diff --git a/util/docopts.md b/util/docopts.md
index 3173608..72d1107 100644
--- a/util/docopts.md
+++ b/util/docopts.md
@@ -24,6 +24,7 @@ OpenServerless Utilities
 
 ```text
 Usage:
+  util apihost
   util system
   util update-cli
   util check-operator-version <version>
@@ -48,6 +49,7 @@ Usage:
 ## Commands
 
 ```
+-  apihost                 current apihost
 -  system                  system info (<os>-<arch> in Go format)
 -  update-cli              update the cli downloading the binary
 -  check-operator-version  check if you need to update the operator
diff --git a/util/opsfile.yml b/util/opsfile.yml
index 0358cc0..28e35c7 100644
--- a/util/opsfile.yml
+++ b/util/opsfile.yml
@@ -47,6 +47,12 @@ tasks:
     cmds:
       - echo "{{OS}}-{{ARCH}}"
 
+  apihost:
+    desc: current apihost``
+    silent: true
+    cmds:
+      - ops -wsk property get | awk '/whisk API host/{print $4}'
+
   update-cli:
     desc: update CLI
     silent: true

Reply via email to