I am using rake and the git_repositoy gem to deploy my rails app to github. The rake task i use looks like the following:
task :test_deploy, :message do | t, args|
@git = GitRepository.new
Rake::Task[:test].invoke
commit(args.message,@git)
Rake::Task[:push_to_origin].invoke
Rake::Task[:deploy_to_heroku].invoke
end
task :push_to_origin do
@git.push
end
def commit(message,git_repository)
if(git_repository.has_untracked?)
git_repository.add
end
if(git_repository.has_changes?)
git_repository.commit(:message => message, :options => "-a")
end
end
So when i call rake i do it in the following way rake test_deploy['my commit message']
.
I want to be able to do this with a sublime build task that prompts me for a message and executes it. Does anyone know to get sublime to give me a message box prompt for a build task?
Thanks,
Ben