Skip to content

Commit 84c6ab7

Browse files
committed
release-lists: don't show build failure for binary crates
1 parent 11a675c commit 84c6ab7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Diff for: src/web/releases.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ pub struct Release {
3939
description: Option<String>,
4040
target_name: Option<String>,
4141
rustdoc_status: bool,
42+
build_status: bool,
43+
is_library: bool,
4244
deployment_pending: bool,
4345
pub(crate) build_time: DateTime<Utc>,
4446
stars: i32,
@@ -83,7 +85,9 @@ pub(crate) fn get_releases(
8385
releases.target_name,
8486
releases.rustdoc_status,
8587
builds.build_time,
86-
repositories.stars
88+
repositories.stars,
89+
releases.build_status,
90+
releases.is_library
8791
FROM crates
8892
{1}
8993
INNER JOIN builds ON releases.id = builds.rid
@@ -115,6 +119,8 @@ pub(crate) fn get_releases(
115119
build_time: row.get(5),
116120
deployment_pending: crate_invalidation_pending(&row.get(5)),
117121
stars: row.get::<_, Option<i32>>(6).unwrap_or(0),
122+
build_status: row.get(7),
123+
is_library: row.get(8),
118124
})
119125
.collect()
120126
}
@@ -206,7 +212,9 @@ fn get_search_results(
206212
builds.build_time,
207213
releases.target_name,
208214
releases.rustdoc_status,
209-
repositories.stars
215+
repositories.stars,
216+
releases.build_status,
217+
releases.is_library
210218
211219
FROM crates
212220
INNER JOIN releases ON crates.latest_version_id = releases.id
@@ -231,6 +239,8 @@ fn get_search_results(
231239
target_name: row.get("target_name"),
232240
rustdoc_status: row.get("rustdoc_status"),
233241
stars: stars.unwrap_or(0),
242+
build_status: row.get("build_status"),
243+
is_library: row.get("is_library"),
234244
},
235245
)
236246
})

Diff for: templates/releases/releases.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
{{ "check" | fas }}
6363
</div>
6464
{%- endif -%}
65-
{%- else -%}
65+
{%- elif release.is_library and not release.build_status -%}
6666
<div class="pure-u-1 pure-u-sm-1-24 pure-u-md-1-24 deploymentstatus"
6767
title="build error">
6868
{{ "triangle-exclamation" | fas(fw=true) }}

0 commit comments

Comments
 (0)