Rakefile in como-0.1.2 vs Rakefile in como-0.1.3
- old
+ new
@@ -25,5 +25,35 @@
sh "gem push como*.gem"
else
raise "Multiple gems in the directory..."
end
end
+
+
+# Create como.gemspec with current version and date fields.
+file 'como.gemspec' => [:version, 'como.rx.gemspec'] do
+ sh "mucgly -i como.rx.gemspec -o como.gemspec"
+ sh "ruvermgr -f .version -i build"
+ # sh "ruvermgr -f .version"
+end
+
+
+# Create 'lib/version.rb' file including 'Como.version' method.
+# :version task is usually executed indirectly by 'como.gemspec'.
+task :version do
+ version = %x{ruvermgr -f .version -o ruby}.chomp
+ File.open( "lib/version.rb", 'w' ) do |fh|
+ fh.puts "\
+module Como
+
+ def Como.version
+ ComoCommon::VERSION
+ end
+
+ class ComoCommon
+ VERSION=\"#{version}\"
+ end
+
+end
+"
+ end
+end