-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Homebrew/homebrew-core#507
CocoaPods/CocoaPods#2238 (comment)
We do this already in the CP mac app:
FileUtils.remove_dir("homebrew_cask") if Dir.exists? "homebrew_cask"
sh "git clone https://github.com/caskroom/homebrew-cask.git homebrew_cask"
Dir.chdir('homebrew_cask') do
sh "git pull origin master"
sh "git remote add fork https://github.com/#{cask_fork}.git"
sh "git checkout -b #{branch}"
cask_file = 'Casks/cocoapods.rb'
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{ cat ../gh-pages/sparkle.xml | sed 's|<pubDate>[^<]*</pubDate>||g' | shasum --algorithm 256 | awk '{ print $1 }'}.strip
cask.sub! /checkpoint: '[[:xdigit:]]+'/, "checkpoint: '#{sparkle_checkpoint}'"
File.open(cask_file, 'w') { |f| f.write(cask) }
sh "git commit -am '#{message}'"
sh "git push fork"
end
REST.post("https://api.github.com/repos/caskroom/homebrew-cask/pulls?access_token=#{github_access_token}",
{title: message, head: cask_fork.split('/').first + ":#{branch}", base: 'master'}.to_json,
github_headers)
end
endWe can probably make a variation that does it for the main gems pretty simply
matejko0077
Metadata
Metadata
Assignees
Labels
No labels