aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
authorJan <sentrycraft123@gmail.com>2024-06-18 23:11:33 +0200
committerGitHub <noreply@github.com>2024-06-18 23:11:33 +0200
commit98b953d5c81b31857ca695b92e89d65504957872 (patch)
tree48a949e965954feac6cd5e99198eb5badc49461e /src-tauri/src
parent8991b7ade7174376ee007dbff7797cc7e65cec02 (diff)
downloadFlightCore-98b953d5c81b31857ca695b92e89d65504957872.tar.gz
FlightCore-98b953d5c81b31857ca695b92e89d65504957872.zip
fix: Check for MSVC build if multiple artifacts are available (#949)
Needed with a planned PR into NorthstarLauncher
Diffstat (limited to 'src-tauri/src')
-rw-r--r--src-tauri/src/github/pull_requests.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src-tauri/src/github/pull_requests.rs b/src-tauri/src/github/pull_requests.rs
index bf7a8fdb..7e400c1a 100644
--- a/src-tauri/src/github/pull_requests.rs
+++ b/src-tauri/src/github/pull_requests.rs
@@ -48,6 +48,7 @@ struct ActionsRunsResponse {
#[derive(Debug, Deserialize, Clone)]
struct Artifact {
id: u64,
+ name: String,
workflow_run: WorkflowRun,
}
@@ -206,8 +207,14 @@ pub async fn get_launcher_download_link(commit_sha: String) -> Result<String, St
)
.unwrap();
+ let multiple_artifacts = artifacts_response.artifacts.len() > 1;
+
// Iterate over artifacts
for artifact in artifacts_response.artifacts {
+ if multiple_artifacts && !artifact.name.starts_with("NorthstarLauncher-MSVC") {
+ continue;
+ }
+
// Make sure artifact and CI run commit head sha match
if artifact.workflow_run.head_sha == workflow_run.head_sha {
// Download artifact