Sha256: a88ab91cae2d078fbbe09b8051d4a85a7bc0e5761e4318d3de87a8cbf89fc5b0
Contents?: true
Size: 926 Bytes
Versions: 30
Compression:
Stored size: 926 Bytes
Contents
#!/usr/bin/env ruby root = File.join(File.dirname(__FILE__), '..') svn_info = `svn info #{root.inspect} 2>&1 || svk info #{root.inspect} 2>&1` if svn_info =~ %r{Repository Root: [^\n]*zenadmin.org.*Revision: (\d+)}m rev = $1 else svk_info = `svk info #{root.inspect} 2>&1` if svk_info =~ %r{zenadmin.org/zena, Rev. (\d+)} rev = $1 elsif svk_info =~ %r{(Merged|Copied) From: (.*?), Rev} svk_info = `svk info /#{$2} 2>&1` if svk_info =~ %r{zenadmin.org/zena(/trunk|), Rev. (\d+)} rev = $2 else puts "revision number could not be found using svn or svk" end end end if rev version_file = File.read(File.join(root, 'config', 'version.rb')) File.open(File.join(root, 'config', 'version.rb'), 'wb') do |f| f.print version_file.sub(/(REV *)=.*$/, "\\1= #{rev}") end puts "revision number updated to #{rev}" else puts "could not find revision number through svn info" end
Version data entries
30 entries across 30 versions & 1 rubygems