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

Version Path
zena-1.2.8 script/set_revision
zena-1.2.7 script/set_revision
zena-1.2.6 script/set_revision
zena-1.2.5 script/set_revision
zena-1.2.4 script/set_revision
zena-1.2.3 script/set_revision
zena-1.2.2 script/set_revision
zena-1.2.1 script/set_revision
zena-1.2.0 script/set_revision
zena-1.1.3 script/set_revision
zena-1.1.2 script/set_revision
zena-1.1.1 script/set_revision
zena-1.1.0 script/set_revision
zena-1.0.0 script/set_revision
zena-1.0.0.rc3 script/set_revision
zena-1.0.0.rc2 script/set_revision
zena-1.0.0.rc1 script/set_revision
zena-0.16.9 script/set_revision
zena-1.0.0.beta3 script/set_revision
zena-0.16.8 script/set_revision