diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2023-01-13 09:57:59 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2023-01-13 09:57:59 +0000 |
commit | 4590768e530a470a8fb8917dafee69932831c854 (patch) | |
tree | 751335b8c81fc243a5ac5f858d13a6bbe8192beb /scripts | |
parent | c919e9aa7738790718b1c1a3700cadfd7f8cbce2 (diff) | |
download | cpu_features-4590768e530a470a8fb8917dafee69932831c854.tar.gz |
Fix badges in README.md
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/generate_badges.d | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/generate_badges.d b/scripts/generate_badges.d index 1cb8159..bf5aa54 100644 --- a/scripts/generate_badges.d +++ b/scripts/generate_badges.d @@ -82,20 +82,22 @@ const: return format("%s: https://img.shields.io/badge/%s-N%%2FA-lightgrey", disabled_image_ref, build_system); } - string link_decl() + string filename() { import std.uni : toLower; - const filename = toLower(format("%s_%s_%s.yml", cpu, os, build_system)); - return format("%s: https://github.com/google/cpu_features/actions/workflows/%s", link_ref, filename); + return toLower(format("%s_%s_%s.yml", cpu, os, build_system)); } - string image_decl() + string link_decl() { - import std.uri : encode; + return format("%s: https://github.com/google/cpu_features/actions/workflows/%s", link_ref, filename()); + } - const worflow_name = encode(format("%s %s %s", cpu, os, build_system)); - return format("%s: https://img.shields.io/github/workflow/status/google/cpu_features/%s/main?label=%s", image_ref, worflow_name, build_system); + string image_decl() + { + return format( + "%s: https://img.shields.io/github/actions/workflow/status/google/cpu_features/%s?branch=main&label=%s", image_ref, filename(), build_system); } } |