[Update Script] Add new JSON generator
Source is included here: https://github.com/losnoco/sparkle-to-JSON Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
49f88ae37f
commit
ea3d38bcae
2 changed files with 5 additions and 1 deletions
BIN
Scripts/sparkleToJSON
Executable file
BIN
Scripts/sparkleToJSON
Executable file
Binary file not shown.
|
@ -119,11 +119,15 @@ if 1 #appcast_revision < latest_revision
|
||||||
#Clean up
|
#Clean up
|
||||||
%x[rm -rf '#{temp_path}/Cog.app']
|
%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
|
#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/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
|
# 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
|
#Send web hook to update site
|
||||||
update_uri = %x[security find-generic-password -w -a #{ENV['LOGNAME']} -s cogupdateurl].chop
|
update_uri = %x[security find-generic-password -w -a #{ENV['LOGNAME']} -s cogupdateurl].chop
|
||||||
|
|
Loading…
Reference in a new issue