The intention is that public tasks is a callerable one from CLI command, which could have a chaine of depenent protected tasks for detailed implementations
Also, for collaboration of different projects, it is a implicit rule that public task is more like a interface to be consumable and protected tasks are internal private business.
There is no hard rule to forbid you to use protected tasks, it is just a mutual common contract to collaborate with each other in a clear standard
up list -d ./tests/functests -t c0140.yml -i dev --configdir=./tests/functests
loading [Config]: ./tests/functests/upconfig
loading [Task]: ./tests/functests/c0140.yml
instance id: dev
-task list
1 | Main: | public| main entry
2 | Build: | public| A build task
3 | internal: |protected| a internal process needed by Build
-
tasks:
- name: task
desc: main entry
task:
- func: cmd
do:
- name: print
cmd: 'I am the main entry'
- name: Build
desc: A build task
task:
- func: cmd
do:
- name: print
cmd: 'I am the build task'
- func: call
do:
- internal
- name: internal
desc: a internal process needed by Build
task:
- func: cmd
do:
- name: print
cmd: 'I am a internal task'
loading [Config]: ./tests/functests/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/functests
WorkDir -> cwd
AbsWorkDir -> /up_project/up
TaskFile -> c0140
Verbose -> vvv
ModuleName -> self
ShellType -> /bin/sh
MaxCallLayers -> 8
Timeout -> 3600000
MaxModuelCallLayers -> 256
EntryTask -> task
ModRepoUsernameRef ->
ModRepoPasswordRef ->
work dir: /up_project/up
-exec task: task
loading [Task]: ./tests/functests/c0140
module: [self], instance id: [dev], exec profile: []
profile - envVars:
(*core.Cache)({
})
Task1: [task ==> task: main entry ]
-Step1:
self: final context exec vars:
(*core.Cache)({
"up_runtime_task_layer_number": 0
})
~SubStep1: [print: ]
I am the main entry