diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-06 10:53:35 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-06 10:53:35 +0200 |
commit | 49e880da1dbab3850c4eb1682bafad6b57267817 (patch) | |
tree | f2bba3048b297189ef51fe304edbb4ec34736801 /ruby/ffi-k8055/tasks/git.rake | |
parent | 5e0aad9befe6214134a77cb267b8c89596945109 (diff) | |
download | k8055-49e880da1dbab3850c4eb1682bafad6b57267817.zip k8055-49e880da1dbab3850c4eb1682bafad6b57267817.tar.gz |
add ruby/ffi-k8055
Diffstat (limited to 'ruby/ffi-k8055/tasks/git.rake')
-rw-r--r-- | ruby/ffi-k8055/tasks/git.rake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ruby/ffi-k8055/tasks/git.rake b/ruby/ffi-k8055/tasks/git.rake new file mode 100644 index 0000000..b219923 --- /dev/null +++ b/ruby/ffi-k8055/tasks/git.rake @@ -0,0 +1,38 @@ +# -*- coding: UTF-8 -*- +# +if HAVE_GIT + +namespace :git do + + # A prerequisites task that all other tasks depend upon + task :prereqs + + desc 'Show tags from the Git repository' + task :show_tags => 'git:prereqs' do |t| + puts %x/git tag/ + end + + desc 'Create a new tag in the Git repository' + task :create_tag => 'git:prereqs' do |t| + v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z' + abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version + tag = "%s" % [ PROJ.version ] + msg = "Creating tag for #{PROJ.name} version #{PROJ.version}" + puts "Creating Git tag '#{tag}'" + unless system "git tag -a -m '#{msg}' #{tag}" + abort "Tag creation failed" + end +# if %x/git remote/ =~ %r/^origin\s*$/ +# unless system "git push origin #{tag}" +# abort "Could not push tag to remote Git repository" +# end +# end + end + +end # namespace :git + +#task 'gem:release' => 'git:create_tag' + +end # if HAVE_GIT + +# EOF |