-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
28 lines (23 loc) · 906 Bytes
/
Rakefile
File metadata and controls
28 lines (23 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env ruby
require 'rubygems'
VERSION_STRING = ENV['VERSION'] || File.read('VERSION').chomp
namespace :version do
desc "Bump the version number in the VERSION file"
task :bump do
new_version_string = VERSION_STRING.split('.').map(&:to_i)
old_version_tiny = new_version_string[-1]
new_version_tiny = old_version_tiny + 1
new_version_string[-1] = new_version_tiny
new_version_string = new_version_string.map(&:to_s).join('.')
sh "echo '#{new_version_string}' > VERSION"
sh "git commit -m 'Bumped the version to #{new_version_string}.' VERSION"
end
desc "Tag the current revision as release #{VERSION_STRING}"
task :tag do
sh "git tag -s #{VERSION_STRING} -m 'Released version #{VERSION_STRING}.'"
end
end
task :build do
sh "javac -d pkg src/com/dydra/*.java src/com/dydra/rpc/*.java src/com/dydra/annotation/*.java"
end
task :default => :build