Adfaft

CLI

Example

Simple cmd task:

version: '3'

# global variable
vars:
  GREETING: Hey, there!

tasks:

  # menggunakan global variable
  # NOTE: variable dapat ditimpa via command line, `task [taskname] [variable]=[value]`, ex: `task greet GREETING="from ci"`
  greet:
	aliases: [local-greet]
    desc: my task description
    summary: |
      This is multiline summary
      Release your project to github

      It will build your project before starting the release.
      Please make sure that you have set GITHUB_TOKEN before starting.
    cmds: Hello, {{.GREETING}}

Simple global task:

version: '3'

tasks:    

    # include another Taskfile agar mudah dikelola
  includes:
    other-task: ./Taskfile-other.yml
    os-only-task: ./Taskfile-for-{{OS}}.yml # OS Specific task

  # dijalankan di lokasi file Taskfile.yml berada
  from-home:
    cmds:
      - pwd

  # dijalankan di folder saat ini, tidak bergantung dari lokasi file Taskfile.yml
  from-working-directory:
    dir: '{{.USER_WORKING_DIR}}'
    cmds:
      - pwd
      # call another task
      - task: from-home