Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jeking3
Copy link
Collaborator

@jeking3 jeking3 commented Dec 28, 2024

This script helps generate the badge table in README files of many boostorg repos, for example CMT maintained repos.

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (14db964) to head (06cb384).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #258   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           22        22           
  Branches        10        10           
=========================================
  Hits            22        22           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14db964...06cb384. Read the comment docs.

Copy link
Collaborator

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is more general than what we have here in https://github.com/boostorg/boost-ci/blob/master/README.template.md
The idea there was to be able to use the whole readme with a simple search&replace.

Can you use this script to update the template and the main readme of this repo in this PR? The would fix the outdated current readme-badges and IMO makes for a good verification of the script.


ARGS=$(getopt --longoptions "project:,appveyor:,codecov:,coverity:" "p:a:v:y:" -- "$@")

if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
Copy link
Collaborator

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?

case "${1:-*}" in
-p | --project) PROJECT="$2"; shift 2 ;;
-a | --appveyor) APPVEYOR="$2"; shift 2 ;;
-v | --codecov) CODECOV="$2"; shift 2 ;;
Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

while true; do
case "${1:-*}" in
-p | --project) PROJECT="$2"; shift 2 ;;
-a | --appveyor) APPVEYOR="$2"; shift 2 ;;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be enough. For Boost.CI:
[![Build status](https://ci.appveyor.com/api/projects/status/ynnd2l3gu4oiyium/branch/master?svg=true)](https://ci.appveyor.com/project/Flamefire/boost-ci/branch/master)

So we need both the appveyor project owner and that hash/id-thing

COVERITY=

while true; do
case "${1:-*}" in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default of * looks odd, I'd use an empty value. But as any value works this is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants