Update update_feed.rb with new parameter

New parameter for update title for the site generator.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2022-07-31 21:50:05 -07:00
parent 3a64cdd5cc
commit 233dc424cb
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ require 'open-uri'
require 'shellwords' require 'shellwords'
require 'nokogiri' require 'nokogiri'
require 'time' require 'time'
require 'uri'
feed = ARGV[0] || 'mercury' feed = ARGV[0] || 'mercury'
@ -126,5 +127,6 @@ if 1 #appcast_revision < latest_revision
#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] update_uri = %x[security find-generic-password -w -a #{ENV['LOGNAME']} -s cogupdateurl]
%x[curl -X POST #{update_uri}] update_parameter = URI.escape(latest_revision)
%x[curl -X POST "#{update_uri}?trigger_title=#{update_parameter}"]
end end