Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 9 lines (8 sloc) 0.479 kb
#!/usr/bin/env ruby
require 'find'
newversion = `/opt/local/bin/git describe --tags`.match(/(v([0-9]+)\.([0-9]+)-([0-9]+))/).to_s.gsub(/[0-9]+$/){|commit| (commit.to_i + 1).to_s}+Time.now.strftime(" %Y-%m-%d")
buffer = File.new('Classes/ASIHTTPRequest.m','r').read
if !buffer.match(/#{Regexp.quote(newversion)}/)
buffer = buffer.sub(/(NSString \*ASIHTTPRequestVersion = @\")(.*)(";)/,'\1'+newversion+'\3');
File.open('Classes/ASIHTTPRequest.m','w') {|fw| fw.write(buffer)}
end
Jump to Line
Something went wrong with that request. Please try again.