Build system and task runner for Go projects

Overview

Build Status Windows Build Status

Gilbert

Build toolchain and task runner for Go

Features

Gilbert is task runner that aims to provide declarative way to define and run tasks like in other projects like Gradle, Maven and etc.

All tasks are declared in gilbert file (gilbert.yaml). Example of the file you can find here.

Full list of features:

  • Tasks
  • Actions
    • Built-in most necessary actions
      • Track file changes and re-run task on change
      • Check project test coverage with specified threshold
      • Build project
    • Plugins for custom actions

Read documentation and sample project for more information.

Installation

All release binaries are available on the releases page.

Linux, macOS and FreeBSD

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

Windows

Powershell

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.

Some features, like plugins are not available on Windows. We recommend to use Windows Subsystem for Linux (WSL) for full experience.

Usage

Please check out quick start guide.

Tools

Comments
  • erratum in the document

    erratum in the document

    watch action

    The documents says a watch action's config likes

    version: 1.0
    tasks:
      watch:
      - action: watch
        params:
          # ...
          job:
            mixin: build-and-run-server # job to execure, similar to manifest job syntax. required.
    

    but in fact it should be

    version: 1.0
    tasks:
      watch:
      - action: watch
        params:
          # ...
          run: # change here
            mixin: build-and-run-server # job to execure, similar to manifest job syntax. required.
    

    I tried to use a watch action by copying the config sample from its documents and I always failed.

    I couldn't figure out what was going on until I read config.go#L26

    mixin

    The documents tells that a mixin config should be something like

    version: 1.0
      mixins:
        hello-world:
          - plugin: shell
            params:
              command: 'echo "hello world"'
          - plugin: build
    

    but it actually should be

    version: 1.0
      mixins:
        hello-world:
          - action: shell  # change here
            params:
              command: 'echo "hello world"'
          - action: build  # and change here
    

    I also couldn't realized it until I read the codes of the sdk job.go#L41

    bug good first issue docs 
    opened by DoubleFaults 4
  • cover: invalid coverage report for packages without tests

    cover: invalid coverage report for packages without tests

    Assume we want to check coverage for packages that doesn't contain any tests.

    Expected output

    Running task 'cover'...
      - cover
        Coverage report: 0
        Total coverage: 0%
    Task 'cover' ran successfully
    

    Got

    Running task 'cover'...
      - cover
        Coverage report:
        Total coverage: NaN%
    Task 'cover' ran successfully
    
    bug component:actions 
    opened by x1unix 1
  • Action: HTML coverage report

    Action: HTML coverage report

    Add new cover:html action to generate html report for code coverage.

    Example:

    tasks:
      cover-html:
        - action: cover:html
          params:
            packages:
            - './foo'
            - './bar'
    
    opened by x1unix 0
  • Feature: template expressions

    Feature: template expressions

    Adds go template expressions to manifest. Expressions should be wrapped with {{{ ... }}}.

    Also manifest template includes some useful functions:

    • slice - creates a new slice
    • shell - runs shell command and returns command output
    • split - splits string by char
    • yaml - serializes slice to YAML/JSON string

    Example:

    version: 1.0
    
    {{{ $libs := shell "ls -1 ./libs | tr '\n' '\0' | xargs -0 -n 1 basename" | split "\n" }}}
    {{{ $packages := slice "./foo" "./bar" }}}
    
    tasks:
      build-libs:
        {{{ range $libs }}}
        - mixin: build-lib
          vars:
            name: {{{.}}}
        {{{ end }}}
    
        cover:
        - action: cover
          params:
            threshold: 40
            reportCoverage: true
            packages: 
              {{{ $packages | yaml }}}
    
    opened by x1unix 0
  • Release: 0.11.0

    Release: 0.11.0

    Manifest

    • Allow to call another task with task property

    Cli

    • Add -json flag to ls command

    Breaking changes

    opened by x1unix 0
  • cover: no output if failed to execute tests

    cover: no output if failed to execute tests

    Steps to reproduce

    • set GOOS variable to different OS (e.g. darwin)
    • run tests
    • returned exit code error, but no error info in output

    Expected

    Same error output as from go test

    Got

    Just exit code error

    bug component:actions 
    opened by x1unix 0
  • Release: 0.10.0

    Release: 0.10.0

    Fixes

    • cover - report failed tests during coverage check (https://github.com/go-gilbert/gilbert/issues/55)

    New features

    cover action

    • Report failed tests
    • Notify about packages without tests
    • Show list of packages without tests with showUncovered option

    build action

    • Pass Go build tags with tags option (https://github.com/go-gilbert/gilbert/issues/54)

    Internal

    • Change formatting for debug messages
    opened by x1unix 0
  • cover-action: no log output on failed tests

    cover-action: no log output on failed tests

    Gilbert doesn't show errors came from go test tool if some test failed

    Running task 'cover'...
      - cover
    ERROR: task 'cover' returned an error on step 1: process finished with non-zero status code: 1
    
    bug component:actions 
    opened by x1unix 0
  • Release: 0.9.0

    Release: 0.9.0

    Changelog

    New features

    Command-line

    Added --var flag that allows to set or override variables:

    gilbert run task_name --var var1=value --var var2=value
    

    Plugins

    • go handler - import local package as Gilbert plugin

    Actions

    cover

    Added sort feature with sort param.

      cover:
      - action: cover
        params:
          threshold: 60
          sort:
            by: 'name'    # accepted values: 'name', 'coverage' 
            desc: false   # sort order
          packages:
            - ./...
    
    opened by x1unix 0
  • cmd: override variables

    cmd: override variables

    Adds cmd flag --var that allows to set or override job variables:

    Example

    gilbert run task_name --var var1=value --var var2=value
    

    Closes https://github.com/go-gilbert/gilbert/issues/46

    opened by x1unix 0
  • cover: sort coverage report

    cover: sort coverage report

    Adds coverage report sort feature with sort param.

    Closes https://github.com/go-gilbert/gilbert/issues/45

    Example

      cover:
      - action: cover
        params:
          threshold: 60
          sort:
            by: 'name'    # accepted values: 'name', 'coverage' 
            desc: false   # sort order
          packages:
            - ./...
    
    opened by x1unix 0
Releases(v1.1.0)
Owner
Gilbert
A powerful task runner for Go projects
Gilbert
Concurrent task runner, developer's routine tasks automation toolkit. Simple modern alternative to GNU Make 🧰

taskctl - concurrent task runner, developer's routine tasks automation toolkit Simple modern alternative to GNU Make. taskctl is concurrent task runne

null 235 Dec 14, 2022
CBuild build system - A tiny build system for C

cuild - CBuild A build system for C Building $ go build . Usage Similar to GNU Make, a file named "Cuildfile" is required. You have a few flags to us

Laurentino Luna 0 Jan 17, 2022
Please is a cross-language high-performance extensible build system for reproducible multi-language builds.

Please is a cross-language build system with an emphasis on high performance, extensibility and reproducibility. It supports a number of popular languages and can automate nearly any aspect of your build process.

Thought Machine 2.2k Dec 30, 2022
Blueprint Build System For Golang

Blueprint Build System Blueprint is being archived on 2021 May 3. On 2021 May 3, we will be archiving the Blueprint project. This means it will not be

GengKapak WIP 0 Nov 20, 2021
a build tool for Go, with a focus on cross-compiling, packaging and deployment

goxc NOTE: goxc has long been in maintenance mode. Ever since Go1.5 supported simple cross-compilation, this tool lost much of its value. There are st

Am Laher 1.7k Dec 9, 2022
Build and (re)start go web apps after saving/creating/deleting source files.

unmaintained Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web f

Andrea Franz 3.5k Jan 2, 2023
KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes.

What is Kintohub? KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes. Build your cod

KintoHub 30 Jun 7, 2022
Create build pipelines in Go

taskflow Create build pipelines in Go This package aims to simplify the creation of build pipelines in Go instead of using scripts or Make. taskflow A

Robert Pająk 352 Dec 30, 2022
Colorize (highlight) `go build` command output

colorgo colorgo is a wrapper to go command that colorizes output from go build and go test. Installation go get -u github.com/songgao/colorgo Usage c

Song Gao 112 Dec 18, 2022
EGo lets you build, debug und run Go apps on Intel SGX - as simple as conventional Go programming!

EGo is a framework for building confidential apps in Go. Confidential apps run in always-encrypted and verifiable enclaves on Intel SGX-enabled ha

Edgeless Systems GmbH 367 Dec 28, 2022
Build systems with Go examples

What is this? This is a repository containing all the examples from the book BUILD SYSTEMS with GO (and save the world). This book is written to help

Juan M. Tirado 104 Dec 23, 2022
🌍 Earthly is a build automation tool for the container era

?? Earthly is a build automation tool for the container era. It allows you to execute all your builds in containers. This makes them self-contained, repeatable, portable and parallel. You can use Earthly to create Docker images and artifacts (eg binaries, packages, arbitrary files).

Earthly 8.5k Dec 30, 2022
An experimental way to apply patches to the Go runtime at build time.

go-patch-overlay An experimental way to apply patches to the Go runtime at build time. Assuming you have a directory of patches to apply to the Go sou

Felix Geisendörfer 17 Oct 31, 2022
go language generics system

Gotgo This document describes the third iteration of my attempt at a reasonable implementation of generics for go based on the idea of template packag

David Roundy 119 Dec 4, 2021
A Distributed Continuous Integration System from MongoDB

Evergreen Evergreen is a distributed continuous integration system built by MongoDB. It dynamically allocates hosts to run tasks in parallel across ma

Evergreen 371 Dec 24, 2022
Golang binaries compiled on-demand for your system

Go Binaries Go Binaries is an on-demand binary server, allowing non-Go users to quickly install tools written in Go without installing go itself, and

TJ Holowaychuk 762 Dec 3, 2022
Monitoring changes in the source file and automatically compile and run (restart).

dogo Monitoring changes in the source file and automatically compile and run (restart). 中文 Install go get github.com/liudng/dogo Create config Here's

null 254 Dec 28, 2022
Builds and restarts a Go project when it crashes or some watched file changes

gaper Used to build and restart a Go project when it crashes or some watched file changes Aimed to be used in development only. Changelog See Releases

Max Claus Nunes 64 Dec 30, 2022
Various tools for usage with Golang like installer, github tool and cloud features.

Gopei2 (Go Programming Environment Installer) Gopei shell install Go compiler, LiteIDE and configure for you the entire environment, variables, paths,

George Calianu 101 Dec 23, 2022