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.
swiftingly
Christopher Snowhill 2022-06-20 05:18:38 -07:00
parent 08107f4a41
commit f85c86c5ba
1 changed files with 4 additions and 1 deletions

View File

@ -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/ )