Skip to content

Commit 49f97b6

Browse files
committed
macos 15 runner (#47)
Signed-off-by: Daniel Guns <danbguns@gmail.com>
1 parent cfa0ea1 commit 49f97b6

2 files changed

Lines changed: 39 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
asset_name: flux9s-macos-aarch64.tar.gz
6060
use_tar: true
6161

62-
- os: macos-13
62+
- os: macos-15-intel
6363
target: x86_64-apple-darwin
6464
artifact_name: flux9s
6565
asset_name: flux9s-macos-x86_64.tar.gz

src/tui/views/resource_fields.rs

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@ pub fn extract_resource_specific_fields(
1212

1313
if let Some(spec) = obj.get("spec").and_then(|s| s.as_object()) {
1414
match FluxResourceKind::parse_optional(resource_type) {
15-
Some(FluxResourceKind::GitRepository)
16-
| Some(FluxResourceKind::OCIRepository)
17-
| Some(FluxResourceKind::HelmRepository) => {
15+
Some(FluxResourceKind::GitRepository) | Some(FluxResourceKind::HelmRepository) => {
1816
if let Some(url) = spec.get("url").and_then(|u| u.as_str()) {
1917
fields.insert("URL".to_string(), url.to_string());
2018
}
2119
if let Some(branch) = spec.get("branch").and_then(|b| b.as_str()) {
2220
fields.insert("BRANCH".to_string(), branch.to_string());
2321
}
2422
}
23+
Some(FluxResourceKind::OCIRepository) => {
24+
if let Some(semver) = spec
25+
.get("ref")
26+
.and_then(|s| s.get("semver"))
27+
.and_then(|se| se.as_str())
28+
{
29+
fields.insert("SEMVER".to_string(), semver.to_string());
30+
}
31+
}
2532
Some(FluxResourceKind::Kustomization) => {
2633
if let Some(path) = spec.get("path").and_then(|p| p.as_str()) {
2734
fields.insert("PATH".to_string(), path.to_string());
@@ -119,6 +126,23 @@ pub fn extract_resource_specific_fields(
119126
fields.insert("STATUS".to_string(), release_status.to_string());
120127
}
121128
}
129+
if FluxResourceKind::parse_optional(resource_type) == Some(FluxResourceKind::OCIRepository)
130+
{
131+
if let Some(digest) = status
132+
.get("artifact")
133+
.and_then(|a| a.get("digest"))
134+
.and_then(|d| d.as_str())
135+
{
136+
fields.insert("DIGEST".to_string(), digest.to_string());
137+
}
138+
if let Some(revision) = status
139+
.get("artifact")
140+
.and_then(|a| a.get("revision"))
141+
.and_then(|r| r.as_str())
142+
{
143+
fields.insert("REVISION".to_string(), revision.to_string());
144+
}
145+
}
122146
}
123147

124148
fields
@@ -127,7 +151,7 @@ pub fn extract_resource_specific_fields(
127151
/// Get column headers for a resource type
128152
pub fn get_resource_type_columns(resource_type: &str) -> Vec<&'static str> {
129153
match FluxResourceKind::parse_optional(resource_type) {
130-
Some(FluxResourceKind::GitRepository) | Some(FluxResourceKind::OCIRepository) => vec![
154+
Some(FluxResourceKind::GitRepository) => vec![
131155
"STATUS",
132156
"NAMESPACE",
133157
"NAME",
@@ -137,6 +161,16 @@ pub fn get_resource_type_columns(resource_type: &str) -> Vec<&'static str> {
137161
"SUSPENDED",
138162
"READY",
139163
],
164+
Some(FluxResourceKind::OCIRepository) => {
165+
vec![
166+
"STATUS",
167+
"NAMESPACE",
168+
"NAME",
169+
"SEMVER",
170+
"DIGEST",
171+
"REVISION",
172+
]
173+
}
140174
Some(FluxResourceKind::HelmRepository) => vec![
141175
"STATUS",
142176
"NAMESPACE",

0 commit comments

Comments
 (0)