Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sgaunet/retry

A command line retry tool
https://github.com/sgaunet/retry

Last synced: 14 days ago
JSON representation

A command line retry tool

Awesome Lists containing this project

README

        

[![Go Report Card](https://goreportcard.com/badge/github.com/sgaunet/retry)](https://goreportcard.com/report/github.com/sgaunet/retry)
![GitHub Downloads](https://img.shields.io/github/downloads/sgaunet/retry/total)
![GitHub Release](https://img.shields.io/github/v/release/sgaunet/retry)
[![Maintainability](https://api.codeclimate.com/v1/badges/0e256e045884b149b015/maintainability)](https://codeclimate.com/github/sgaunet/retry/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0e256e045884b149b015/test_coverage)](https://codeclimate.com/github/sgaunet/retry/test_coverage)

# retry

retry command will execute X times a failed command until it's successful. Interesting for flakky tests for example or to wait after something.

# Getting started

Usage is quite simple :

```
$ ./retry -h
Usage of retry:
-c string
command to execute
-h print help
-m uint
max tries of execution of failed command (default 3)
-s uint
sleep time in seconds between each try
-version
print version
```

Demo:

![demo](doc/demo.gif)

# Install

## From binary

Download the binary in the release section.

## From Docker image

Docker registry is: sgaunet/retry

The docker image is only interesting to copy the binary in your docker image.

# Development

This project is using :

* golang
* [task for development](https://taskfile.dev/#/)
* docker
* [docker buildx](https://github.com/docker/buildx)
* docker manifest
* [goreleaser](https://goreleaser.com/)
* [pre-commit](https://pre-commit.com/)

There are hooks executed in the precommit stage. Once the project cloned on your disk, please install pre-commit:

```
brew install pre-commit
```

Install tools:

```
task dev:install-prereq
```

And install the hooks:

```
task dev:install-pre-commit
```

If you like to launch manually the pre-commmit hook:

```
task dev:pre-commit
```