https://github.com/kakwa/gen-badge
Small shell script to generate a "Travis-CI" like SVG status badges/shields
https://github.com/kakwa/gen-badge
badge shell shield svg
Last synced: over 1 year ago
JSON representation
Small shell script to generate a "Travis-CI" like SVG status badges/shields
- Host: GitHub
- URL: https://github.com/kakwa/gen-badge
- Owner: kakwa
- License: mit
- Created: 2018-12-05T16:36:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T11:00:23.000Z (over 7 years ago)
- Last Synced: 2025-01-30T19:49:59.644Z (over 1 year ago)
- Topics: badge, shell, shield, svg
- Language: Shell
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gen-badge

A pure shell badge/shield generator with no dependency required.
## Description
This is a simple "Travis-ci" like badge/shield generator that can easily be included in your project.
Typically I use it in my Jenkins projects to create some additionnal badges like
doc build status or code coverage percentage badges which are then published using `publishHTML`.
This small script permits to customize the color, label (text in the right part of the badge)
and status (text in the left part).
It automatically handles the resizing of the badge depending on status and label text length.
It also automatically chooses black or white text depending on the brightness of the status color.
## Usage
Here are a few example on how to use this scipt:
```bash
# Display the help
./gen-status-badge -h
# Generate an 'ok' badge (will be green by default)
./gen-status-badge -o badge.svg -l 'build' -s 'ok'
# Generate a 'ko' badge (will be red by default)
./gen-status-badge -o badge.svg -l 'build' -s 'ko'
# Generate with a custom color (needs to be an RGB definition (#RGB or #RRGGBB))
./gen-status-badge -o badge.svg -l 'gen badge is' -s 'pink' -c '#ff99ff'
```
## Install
```bash
make install PREFIX=/usr/local/ # DESTDIR=/some/build/dir/
```