Skip to content

Allow for use of > to perform string Folding #702

@FilBot3

Description

@FilBot3

Feature Request

Please allow the use of YAML > folding for strings. Example:

---
# https://taskfile.dev
version: '3'

vars:
  DOCKER: podman

tasks:
  default:
    cmds:
      - echo "Hello, World!"

  build-dev:
    desc: Use Podman/Docker to build the React App.
    cmds:
      - "{{.DOCKER}} run \
          --rm \
          --userns=keep-id \
          --volume=\"$(pwd):/home/node/user:Z\" \
          --workdir=\"/home/node/user\" \
          --entrypoint=\"npm\" \
          docker.io/library/node:16 \
            run build:dev"

  build-prod:
    desc: Use Podman/Docker to build the React App.
    cmds:
      - "{{.DOCKER}} run \
          --rm \
          --userns=keep-id \
          --volume=\"$(pwd):/home/node/user:Z\" \
          --workdir=\"/home/node/user\" \
          --entrypoint=\"npm\" \
          docker.io/library/node:16 \
            run build:prod"

  podman-build:
    desc: Build the Application Container.
    cmds:
      - "{{.DOCKER}} build \
           --file=containers/Dockerfile \
           --tag=localhost/fhirmemberrecordapp:latest \
           ."

  podman-run:
    desc: Run the container for testing.
    cmds:
      - podman run --rm --read-only --env="CONTAINER_DEBUG=true" --env="inject_arg_MRA_API_BASE=philrockssocks" --mount="type=tmpfs,destination=/var/cache/nginx" --mount="type=tmpfs,destination=/usr/share/nginx/html" --entrypoint="/bin/bash" -it localhost/fhirmemberrecordapp:latest

  podman-run2:
    desc: Run the container for testing.
    cmds:
      - >
        podman run 
          --rm 
          --read-only 
          --env="CONTAINER_DEBUG=true" 
          --env="inject_arg_MRA_API_BASE=philrockssocks" 
          --mount="type=tmpfs,destination=/var/cache/nginx" 
          --mount="type=tmpfs,destination=/usr/share/nginx/html" 
          --entrypoint="/bin/bash" 
          -it 
          localhost/fhirmemberrecordapp:latest
...

The second podman-run2 is the desired format. When I've used this, Task doesn't seem to follow that then see's only the first line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: dependenciesChanges related to dependency files.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions