-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shell script to generate build status for READMEs #258
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# | ||
# Generates markdown for README build status badges. | ||
# | ||
# Copyright 2025 James E. King III <jking@apache.org> | ||
# | ||
|
||
set -eu | ||
|
||
ARGS=$(getopt --longoptions "project:,appveyor:,codecov:,coverity:" "p:a:v:y:" -- "$@") | ||
|
||
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi | ||
|
||
eval set -- "$ARGS" | ||
|
||
PROJECT= | ||
APPVEYOR= | ||
CODECOV= | ||
COVERITY= | ||
|
||
while true; do | ||
case "${1:-*}" in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default of |
||
-p | --project) PROJECT="$2"; shift 2 ;; | ||
-a | --appveyor) APPVEYOR="$2"; shift 2 ;; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to be enough. For Boost.CI: So we need both the appveyor project owner and that hash/id-thing |
||
-v | --codecov) CODECOV="$2"; shift 2 ;; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Especially for this we need to have a comment/help text which token is required here. I fear that some might leak their secret token if it isn't clear what this is. |
||
-y | --coverity) COVERITY="$2"; shift 2 ;; | ||
--) shift ;; | ||
*) break ;; | ||
esac | ||
done | ||
|
||
cat <<EOF | ||
<!-- boost-ci/tools/makebadges.sh --project ${PROJECT} --appveyor ${APPVEYOR} --codecov ${CODECOV} --coverity ${COVERITY} --> | ||
| Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests | | ||
| :-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- | | ||
| [\`master\`](https://github.com/boostorg/${PROJECT}/tree/master) | [![Build Status](https://github.com/boostorg/${PROJECT}/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/${PROJECT}/actions?query=branch:master) | [![Build status](https://ci.appveyor.com/api/projects/status/${APPVEYOR}/branch/master?svg=true)](https://ci.appveyor.com/project/cppalliance/${PROJECT//_/-}/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/${COVERITY}/badge.svg)](https://scan.coverity.com/projects/boostorg-${PROJECT}) | [![codecov](https://codecov.io/gh/boostorg/${PROJECT}/branch/master/graph/badge.svg?token=${CODECOV})](https://codecov.io/gh/boostorg/${PROJECT}/tree/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/${PROJECT}.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/${PROJECT}) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](https://www.boost.org/development/tests/master/developer/${PROJECT}.html) | ||
| [\`develop\`](https://github.com/boostorg/${PROJECT}/tree/develop) | [![Build Status](https://github.com/boostorg/${PROJECT}/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/${PROJECT}/actions?query=branch:develop) | [![Build status](https://ci.appveyor.com/api/projects/status/${APPVEYOR}/branch/develop?svg=true)](https://ci.appveyor.com/project/cppalliance/${PROJECT//_/-}/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/${COVERITY}/badge.svg)](https://scan.coverity.com/projects/boostorg-${PROJECT}) | [![codecov](https://codecov.io/gh/boostorg/${PROJECT}/branch/develop/graph/badge.svg?token=${CODECOV})](https://codecov.io/gh/boostorg/${PROJECT}/tree/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/${PROJECT}.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/${PROJECT}) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](https://www.boost.org/development/tests/develop/developer/${PROJECT}.html) | ||
EOF | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have some help text what the options are supposed to be?