Quick Start

This article covers installation of Gilbert on your local machine.

Installation

Linux, macOS and FreeBSD

Run this command to install Gilbert on your system:

curl https://raw.githubusercontent.com/go-gilbert/gilbert/master/install.sh | sh

Default installation path is $GOPATH/bin

Windows

You can download release binaries from releases page or install using PowerShell script:

Invoke-Expression (Invoke-Webrequest 'https://raw.githubusercontent.com/go-gilbert/gilbert/master/install.ps1' -UseBasicParsing).Content

Note: You should run Set-ExecutionPolicy Bypass in PowerShell to be able to execute installation script.

Project integration

Gilbert uses gilbert.yaml file to store list of tasks to run in project folder.

To generate a sample gilbert.yaml file, navigate to your project directory in terminal and run gilbert init command:

$ cd $GOPATH/src/github.com/user/myproject
$ gilbert init

This command will generate a sample file with build,clean and cover tasks:

version: 1.0
tasks:
  build:
  - description: Build project
    action: build
  clean:
  - if: [ -f ./vendor ]
    description: Remove vendor files
    action: shell
    params:
      command: rm -rf ./vendor
  cover:
  - description: Check project coverage
    action: cover
    params:
      reportCoverage: true
      threshold: 60
      packages:
      - ./...

Available tasks

To get list of available tasks, run

gilbert ls

Running tasks

To run a task declared in gilbert.yaml, use gilbert run command.

Example:

gilbert run build

See command docs for more information.

Next Steps

We recommend to take a look at theese links to get more information about Gilbert:

Documentation

Examples

Tools