Skip to content

Commit

Permalink
use img.shields.io to render badges
Browse files Browse the repository at this point in the history
  • Loading branch information
melezhik committed Jul 13, 2024
1 parent dbe21ee commit 044eb4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Revision history for Sparky

{{$NEXT}}

- Use img.shields.io to render
project badges
- Fix issues with a usage of
group variables
and template varibaes
Expand Down
12 changes: 8 additions & 4 deletions bin/sparky-web.raku
Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,23 @@ sub create-cro-app ($pool) {
$dbh.dispose;

if $state == -1 {
redirect :permanent, '/icons/build-fail.png';
#redirect :permanent, '/icons/build-fail.png';
redirect :see-other, 'https://img.shields.io/static/v1?label=Sparky&message=Build+|+FAIL&color=red'
}

if $state == 1 {
redirect :permanent, '/icons/build-pass.png';
#redirect :permanent, '/icons/build-pass.png';
redirect :see-other, 'https://img.shields.io/static/v1?label=Sparky&message=Build+|+OK&color=green'
}

if $state == 0 {
redirect :permanent, '/icons/build-run.png';
#redirect :permanent, '/icons/build-run.png';
redirect :see-other, 'https://img.shields.io/static/v1?label=Sparky&message=Build+|+Run&color=yellow'
}

if $state == -2 {
redirect :permanent, '/icons/build-na.png';
#redirect :permanent, '/icons/build-na.png';
redirect :see-other, 'https://img.shields.io/static/v1?label=Sparky&message=Build+|+UNKOWN&color=gray'
}

}
Expand Down

0 comments on commit 044eb4a

Please sign in to comment.