You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add flag to include a Taskfile as un-namespaced #1271
# Taskfile.yaml in ANOTHER PROJECTversion: "3"includes:
remote:
taskfile: .remote/taskfiles/Taskfile.yamloptional: true # Optional only until we have init'd aliases: [r]# Load our project specific variables from .envdotenv: [.env]vars:
REMOTE_BRANCH: masterREMOTE_LOCAL_PATH: ""tasks:
default:
desc: Initializes the Taskfile setup for this project by downloading the remote Taskfile automation repo.silent: truealiases: [init]cmds:
- | if [ -d .remote ]; then rm -rf .remote/ fi mkdir -p .remote if [[ -z "${REMOTE_LOCAL_PATH}" ]]; then echo "Copying remote from local path..." rsync -rq --exclude=.git --exclude=**/.terraform {{.REMOTE_LOCAL_PATH}} .remote else echo "Downloading remote from remote repo..." git clone -b {{.REMOTE_BRANCH}} <remote repo URL> .remote fi
When initialized and the remote taskfiles are included, this results in is a list of tasks like this:
What I don't like about that is the remote namespace is unnecessary and complicates running tasks.
Proposed solution
Add a unnamespace field to the includes object, so something like this:
includes:
remote:
taskfile: .remote/taskfiles/Taskfile.yamloptional: true # Optional only until we have init'd unnamespace: true
unnamespace default to false, but if set to true, will remove the includes namespace from all tasks that are included from that file. For example, my above screenshot (calling task -l would turn into our tasks being like this:
Activity
pd93 commentedon Jul 19, 2023
Closing as a duplicate of #273. Please feel free to upvote/comment over there.