Skip to content

bastean/godo

Repository files navigation

GODO

Predefined task runner.

Important

GODO is still in the early stages of development.


Go Reference GitHub Releases

Upgrade workflow CI workflow Release workflow

License MIT Go Report Card Commitizen friendly Release It!

CLI

Installation

go install github.com/bastean/godo/cmd/godo@latest

Usage

godo
________________  ________ _______
__  ____/__  __ \ ___  __ \__  __ \
_  / __  _  / / / __  / / /_  / / /
/ /_/ /  / /_/ /  _  /_/ / / /_/ /
\____/   \____/   /_____/  \____/

Predefined task runner.

Usage:
  godo [flags]
  godo [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  exec        Execute a list of tasks from a file
  help        Help about any command

Flags:
  -h, --help   help for godo

Use "godo [command] --help" for more information about a command.

Tasks

Exec

Execute a list of tasks from a file, all tasks will be executed following the preset order in the configuration file, if any of the tasks fail, the following tasks will not be executed.

godo exec -c configs/example.exec.json
Example tasks started!
Create a file
We will create a file and write something in it
(1/2) mkdir -p ignore
(2/2) bash -c echo "Example" > ignore/example.txt
File created!
Example tasks completed!

example.exec.json

{
  "Tasks": [
    {
      "Success": "Example tasks started!"
    },
    {
      "Title": "Create a file",
      "Description": "We will create a file and write something in it",
      "Commands": [
        {
          "Name": "mkdir",
          "Args": ["-p", "ignore"]
        },
        {
          "Name": "bash",
          "Args": ["-c", "echo \"Example\" > ignore/example.txt"]
        }
      ],
      "Success": "File created!",
      "Error": "File could not be created"
    },
    {
      "Success": "Example tasks completed!"
    }
  ]
}

Basic structure

{
  "Tasks": [
    {
      "Title": "",
      "Description": "",
      "Commands": [{ "Name": "", "Args": [""] }],
      "Success": "",
      "Error": ""
    }
  ]
}
  • Success is only displayed if the task has been successfully completed.
  • Error is only displayed if an error occurred during the execution of the task.
  • All fields in a task are optional.

First Steps

Clone

HTTPS

git clone https://github.com/bastean/godo.git && cd godo

SSH

git clone git@github.com:bastean/godo.git && cd godo

Initialize

Locally

  1. System Requirements

  2. Run

    make init

Run

Tests

Unit
make test-unit
Integration
make test-integration
Unit & Integration
make tests

Tech Stack

Base

Please see

Contributing

License