From f85c86c5ba97095b215e93111348c37158ea0f14 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 20 Jun 2022 05:18:38 -0700 Subject: [PATCH] Fix update_feed.rb for new Sparkle New Sparkle appcast generator stores the version string in the item rather than as an attribute of the entities. --- Scripts/update_feed.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/update_feed.rb b/Scripts/update_feed.rb index e09b041d8..23fd49863 100755 --- a/Scripts/update_feed.rb +++ b/Scripts/update_feed.rb @@ -24,8 +24,11 @@ sortedchannels = channel.search('./item').sort_by{ |i| Time.parse(i.at('pubDate' #Get the latest revision from the appcast appcast_enclosure = sortedchannels[0].search('./enclosure').first +appcast_revision = sortedchannels[0].xpath('.//sparkle:version').text appcast_url = appcast_enclosure.attribute('url'); -appcast_revision = appcast_enclosure.attribute_with_ns('version', sparkle).to_s; +if !appcast_revision + appcast_revision = appcast_enclosure.attribute_with_ns('version', sparkle).to_s +end appcast_revision_split = appcast_revision.split( /-/ ) appcast_revision_code = appcast_revision_split[1] appcast_revision_split = appcast_revision_code.split( /g/ )