Permalink
Browse files

Add a script to bump version numbers in manifests and features.

  • Loading branch information...
1 parent d625f31 commit 2c3c5a0306d35c41a93f563be94ffae6a8101925 @ketan committed Feb 19, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 tools/version.rb
View
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+
+require 'fileutils'
+
+HERE = File.expand_path('..', __FILE__)
+
+FROM_VERSION=ARGV[0]
+TO_VERSION=ARGV[1]
+
+FileUtils.cd "#{HERE}/.." do
+ files = `git ls-tree -r master | grep 'MANIFEST.MF\\|feature.xml' | awk '{print $4}'`
+ files.each_line do |file|
+ file.chomp!
+ contents = File.read(file).gsub("#{FROM_VERSION}.qualifier", "#{TO_VERSION}.qualifier")
+ File.open(file, 'w') {|f| f.write contents}
+ end
+end

0 comments on commit 2c3c5a0

Please sign in to comment.