Module: ChocTop::RakeTasks

Included in:
Configuration
Defined in:
lib/choctop/rake_tasks.rb

Instance Method Summary collapse

Instance Method Details

#define_tasksObject



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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/choctop/rake_tasks.rb', line 3

def define_tasks
  return unless Object.const_defined?("Rake")

  desc "Build Xcode #{build_type}"
  task :build => "build/#{build_type}/#{target}/Contents/Info.plist"

  task "build/#{build_type}/#{target}/Contents/Info.plist" do
    make_build
  end
  
  task :clean_build do
    FileUtils.rm_rf(build_path)
  end

  desc "Create the dmg file for appcasting"
  task :dmg => :build do
    detach_dmg
    make_dmg
    detach_dmg
    convert_dmg_readonly
    add_eula
  end

  desc "Create/update the appcast file"
  task :feed do
    make_appcast
    make_dmg_symlink
    make_index_redirect
    make_release_notes
  end

  desc "Upload the appcast file to the host"
  task :upload => :feed do
    upload_appcast
  end

  task :detach_dmg do
    detach_dmg
  end

  task :size do
    puts configure_dmg_window
  end

  namespace :version do
    desc "Display the current version"
    task :current do
      puts VersionHelper.new(info_plist_path).to_s
    end

    namespace :bump do
      desc "Bump the gemspec by a major version."
      task :major do
        VersionHelper.new(info_plist_path) do |version|
          version.bump_major
        end
      end

      desc "Bump the gemspec by a minor version."
      task :minor do
        VersionHelper.new(info_plist_path) do |version|
          version.bump_minor
        end
      end

      desc "Bump the gemspec by a patch version."
      task :patch do
        VersionHelper.new(info_plist_path) do |version|
          version.bump_patch
        end
      end
    end
  end
end