Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #266 from CocoaPods/seg-update-checkpoint
Browse files Browse the repository at this point in the history
[Rakefile] Update cask sparkle checkpoint on release
  • Loading branch information
orta committed Mar 14, 2016
2 parents 7e687b0 + 6388dff commit 2ffcae1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,12 @@ namespace :release do
cask = File.read(cask_file)
cask.sub! /version '#{Gem::Version::VERSION_PATTERN}'/, "version '#{version}'"
cask.sub! /sha256 '[[:xdigit:]]+'/, "sha256 '#{sha(tarball)}'"
appcast_url = cask.match(/appcast '(.*)'/)[1]
sparkle_checkpoint = %x{curl --silent --compressed "#{appcast_url}"
| sed 's|<pubDate>[^<]*</pubDate>||g'
| shasum --algorithm 256
| awk '{ print $1 }'}
cask.sub! /checkpoint: '[[:xdigit:]]+'/, "checkpoint: '#{sparkle_checkpoint}'"
File.open(cask_file, 'w') { |f| f.write(cask) }

sh "git commit -am '#{message}'"
Expand Down

0 comments on commit 2ffcae1

Please sign in to comment.