项目作者: kakwa

项目描述 :
Small shell script to generate a "Travis-CI" like SVG status badges/shields
高级语言: Shell
项目地址: git://github.com/kakwa/gen-badge.git
创建时间: 2018-12-05T16:36:03Z
项目社区:https://github.com/kakwa/gen-badge

开源协议:MIT License

下载


gen-badge

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:

  1. # Display the help
  2. ./gen-status-badge -h
  3. # Generate an 'ok' badge (will be green by default)
  4. ./gen-status-badge -o badge.svg -l 'build' -s 'ok'
  5. # Generate a 'ko' badge (will be red by default)
  6. ./gen-status-badge -o badge.svg -l 'build' -s 'ko'
  7. # Generate with a custom color (needs to be an RGB definition (#RGB or #RRGGBB))
  8. ./gen-status-badge -o badge.svg -l 'gen badge is' -s 'pink' -c '#ff99ff'

Install

  1. make install PREFIX=/usr/local/ # DESTDIR=/some/build/dir/