Skip to content

Commit

Permalink
Remove "private" tasks' desc to hide them from tasks list (rake -T)
Browse files Browse the repository at this point in the history
  • Loading branch information
potomak committed Feb 2, 2014
1 parent 0c8d49d commit 61332cd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/tasks/tomatoes.rake
@@ -1,23 +1,23 @@
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}'"))

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)
Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 61332cd

Please sign in to comment.