diff --git a/dist/macos/update_appcast_tag.py b/dist/macos/update_appcast_tag.py index 2cb20dd5d..8c2ee8314 100644 --- a/dist/macos/update_appcast_tag.py +++ b/dist/macos/update_appcast_tag.py @@ -77,6 +77,8 @@ elem = ET.SubElement(item, "title") elem.text = f"Build {build}" elem = ET.SubElement(item, "pubDate") elem.text = now.strftime(pubdate_format) +elem = ET.SubElement(item, "sparkle:channel") +elem.text = "stable" elem = ET.SubElement(item, "sparkle:version") elem.text = build elem = ET.SubElement(item, "sparkle:shortVersionString") diff --git a/dist/macos/update_appcast_tip.py b/dist/macos/update_appcast_tip.py index ff1fb4be5..1876f0a17 100644 --- a/dist/macos/update_appcast_tip.py +++ b/dist/macos/update_appcast_tip.py @@ -75,6 +75,8 @@ elem = ET.SubElement(item, "title") elem.text = f"Build {build}" elem = ET.SubElement(item, "pubDate") elem.text = now.strftime(pubdate_format) +elem = ET.SubElement(item, "sparkle:channel") +elem.text = "tip" elem = ET.SubElement(item, "sparkle:version") elem.text = build elem = ET.SubElement(item, "sparkle:shortVersionString") diff --git a/macos/Sources/Features/Update/UpdatePopoverView.swift b/macos/Sources/Features/Update/UpdatePopoverView.swift index 87d76f801..2c56e5f4e 100644 --- a/macos/Sources/Features/Update/UpdatePopoverView.swift +++ b/macos/Sources/Features/Update/UpdatePopoverView.swift @@ -125,7 +125,15 @@ fileprivate struct UpdateAvailableView: View { let dismiss: DismissAction private let labelWidth: CGFloat = 60 - + + private func releaseDateString(date: Date, channel: String?) -> String { + let dateString = date.formatted(date: .abbreviated, time: .omitted) + if let channel, !channel.isEmpty { + return "\(dateString) (\(channel))" + } + return dateString + } + var body: some View { VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 12) { @@ -157,7 +165,7 @@ fileprivate struct UpdateAvailableView: View { Text("Released:") .foregroundColor(.secondary) .frame(width: labelWidth, alignment: .trailing) - Text(date.formatted(date: .abbreviated, time: .omitted)) + Text(releaseDateString(date: date, channel: update.appcastItem.channel)) } .font(.system(size: 11)) }