diff --git a/Scripts/sparkleToJSON b/Scripts/sparkleToJSON new file mode 100755 index 000000000..06efef88d Binary files /dev/null and b/Scripts/sparkleToJSON differ diff --git a/Scripts/update_feed.rb b/Scripts/update_feed.rb index b25b8228c..dd2bc8a7a 100755 --- a/Scripts/update_feed.rb +++ b/Scripts/update_feed.rb @@ -119,11 +119,15 @@ if 1 #appcast_revision < latest_revision #Clean up %x[rm -rf '#{temp_path}/Cog.app'] + #Convert to JSON + %x[pushd '#{site_dir}/#{feed}_builds' && '#{__dir__}/sparkleToJSON' '#{site_dir}/#{feed}_builds/#{feed}.xml' && popd] + #Upload to S3 %x[s3cmd put -P -m application/xml '#{site_dir}/#{feed}_builds/#{feed}.xml' s3://cogcdn.cog.losno.co] + %x[s3cmd put -P -m application/json '#{site_dir}/#{feed}_builds/#{feed}.json' s3://cogcdn.cog.losno.co] # invalidate cache of feed manifest - %x[aws cloudfront create-invalidation --distribution-id E2O8QDAIFS424Q --paths "/#{feed}.xml"] + %x[aws cloudfront create-invalidation --distribution-id E2O8QDAIFS424Q --paths "/#{feed}.*"] #Send web hook to update site update_uri = %x[security find-generic-password -w -a #{ENV['LOGNAME']} -s cogupdateurl].chop