Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sgaunet/retry
- Owner: sgaunet
- License: mit
- Created: 2023-11-09T20:10:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-22T19:25:30.000Z (5 months ago)
- Last Synced: 2024-07-22T23:15:23.415Z (5 months ago)
- Language: Go
- Homepage:
- Size: 176 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```