From 61332cddcce831b31dd77c09e595c8e2c952d2ae Mon Sep 17 00:00:00 2001 From: Giovanni Cappellotto Date: Sun, 2 Feb 2014 16:01:05 +0100 Subject: [PATCH] Remove "private" tasks' desc to hide them from tasks list (rake -T) --- lib/tasks/tomatoes.rake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/tasks/tomatoes.rake b/lib/tasks/tomatoes.rake index 9ebb7ff0..3d8d12ca 100644 --- a/lib/tasks/tomatoes.rake +++ b/lib/tasks/tomatoes.rake @@ -1,15 +1,15 @@ namespace :tomatoes do - desc "Start new release" + # Start new release task :start_release do sh "git flow release start '#{version}'" end - desc "Finish new release" + # Finish new release task :finish_release do sh "git flow release finish '#{version}'" end - desc "Update app version" + # Update app version task :update_application do file_path = Rails.root.join('config', 'application.rb') write_file(file_path, read_file(file_path).gsub(/VERSION = '\d+\.\d+\.\d+'/, "VERSION = '#{version}'")) @@ -17,7 +17,7 @@ namespace :tomatoes do puts "Application config file generated" end - desc "Generate chrome app manifest" + # Generate chrome app manifest task :generate_manifest do file_path = Rails.root.join('chrome_app', 'manifest.json') file_content = read_file(file_path) @@ -30,17 +30,17 @@ namespace :tomatoes do puts "Chrome app manifest file generated" end - desc "Bump version number" + # Bump version number task :bump_version do sh "git commit -am 'bump version number to #{version}'" end - desc "New release" + # New release task :new_release => [:start_release, :update_application, :generate_manifest, :bump_version, :finish_release] do |t, args| puts "New release v. #{version} started" end - desc "Push repo to origin" + # Push repo to origin and heroku remotes task :push do sh "git push origin develop --tags" puts "Pushed to origin/develop" @@ -52,7 +52,7 @@ namespace :tomatoes do puts "Pushed to heroku/master" end - desc "Deploy to Heroku.\nUse this task to deploy a new version of Tomatoes.\nExample 1: 'rake tomatoes:deploy'\nExample 2: 'rake tomatoes:deploy VERSION=0.6'" + desc "Deploy to Heroku.\nUse this task to tag a new version of the app and to deploy it.\nExample 1: 'rake tomatoes:deploy'\nExample 2: 'rake tomatoes:deploy VERSION=0.6'" task :deploy => [:test, :new_release, :push] do puts "Deployment of version #{version} finished" end