File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 6
6
@register .filter
7
7
def strip_minor_version (version ):
8
8
return '.' .join (version .split ('.' )[:2 ])
9
+
10
+
11
+ @register .filter
12
+ def has_sigstore_materials (files ):
13
+ return any (f .sigstore_cert_file or f .sigstore_signature_file for f in files )
Original file line number Diff line number Diff line change @@ -40,13 +40,6 @@ <h1 class="page-title">{{ release.name }}</h1>
40
40
< h1 class ="page-title "> Files</ h1 >
41
41
</ header >
42
42
43
- {% set has_sigstore_materials = false %}
44
- {% for f in release_files %}
45
- {% if f.sigstore_cert_file or f.sigstore_signature_file %}
46
- {% set has_sigstore_materials = true %}
47
- {% endif %}
48
- {% endfor %}
49
-
50
43
< table >
51
44
< thead >
52
45
< tr >
@@ -56,7 +49,7 @@ <h1 class="page-title">Files</h1>
56
49
< th > MD5 Sum</ th >
57
50
< th > File Size</ th >
58
51
< th > GPG</ th >
59
- {% if has_sigstore_materials %}
52
+ {% if release_files| has_sigstore_materials %}
60
53
< th colspan ="2 "> Sigstore</ th >
61
54
{% endif %}
62
55
</ tr >
@@ -70,7 +63,7 @@ <h1 class="page-title">Files</h1>
70
63
< td > {{ f.md5_sum }}</ td >
71
64
< td > {{ f.filesize }}</ td >
72
65
< td > {% if f.gpg_signature_file %}< a href ="{{ f.gpg_signature_file }} "> SIG</ a > {% endif %}</ td >
73
- {% if has_sigstore_materials %}
66
+ {% if release_files| has_sigstore_materials %}
74
67
< td > {% if f.sigstore_cert_file %}< a href ="{{ f.sigstore_cert_file}} "> CRT</ a > {% endif %}</ td >
75
68
< td > {% if f.sigstore_signature_file %}< a href ="{{ f.sigstore_signature_file }} "> SIG</ a > {% endif %}</ td >
76
69
{% endif %}
You can’t perform that action at this time.
0 commit comments