betabuilder 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -16,7 +16,7 @@ This simple task library allows you to configure once and then build, package an
16
16
 
17
17
  To get started, if you don't already have a Rakefile in the root of your project, create one. If you aren't familiar with Rake, it might be worth [going over some of the basics](http://rake.rubyforge.org/) but it's fairly straightforward.
18
18
 
19
- You can install the BetaBuilder gem from your terminal (OSX 10.6 works with a perfectly useful Ruby installation):
19
+ You can install the BetaBuilder gem from your terminal (OSX 10.6 ships with a perfectly useful Ruby installation):
20
20
 
21
21
  $ gem install betabuilder
22
22
 
data/lib/beta_builder.rb CHANGED
@@ -1,13 +1,17 @@
1
+ require 'rake/tasklib'
1
2
  require 'ostruct'
2
3
  require 'fileutils'
3
4
  require 'cfpropertylist'
5
+ require 'beta_builder/archived_build'
4
6
 
5
7
  module BetaBuilder
6
8
  class Tasks < ::Rake::TaskLib
7
9
  def initialize(&block)
8
10
  @configuration = Configuration.new(
9
11
  :configuration => "Adhoc",
10
- :build_dir => "build"
12
+ :build_dir => "build",
13
+ :auto_archive => false,
14
+ :archive_path => File.expand_path("~/Library/MobileDevice/Archived Applications/")
11
15
  )
12
16
  yield @configuration if block_given?
13
17
  define
@@ -30,6 +34,10 @@ module BetaBuilder
30
34
  "#{build_dir}/#{configuration}-iphoneos/#{app_name}"
31
35
  end
32
36
 
37
+ def built_app_dsym_path
38
+ "#{built_app_path}.dSYM"
39
+ end
40
+
33
41
  def deployment_url
34
42
  File.join(deploy_to, target.downcase, ipa_name)
35
43
  end
@@ -58,6 +66,10 @@ module BetaBuilder
58
66
 
59
67
  desc "Package the beta release as an IPA file"
60
68
  task :package => :build do
69
+ # if @configuration.auto_archive
70
+ # Rake::Task['beta:archive'].invoke
71
+ # end
72
+
61
73
  FileUtils.rm_rf('pkg') && FileUtils.mkdir_p('pkg')
62
74
  FileUtils.mkdir_p("pkg/Payload")
63
75
  FileUtils.mv(@configuration.built_app_path, "pkg/Payload/#{@configuration.app_name}")
@@ -135,6 +147,12 @@ module BetaBuilder
135
147
  task :deploy => :package do
136
148
  system("scp pkg/dist/* lukeredpath.co.uk:#{@configuration.remote_installation_path}")
137
149
  end
150
+
151
+ # desc "Build and archive the app"
152
+ # task :archive => :build do
153
+ # archive = BetaBuilder::ArchivedBuild.new(@configuration)
154
+ # archive.save_to(@configuration.archive_path)
155
+ # end
138
156
  end
139
157
  end
140
158
  end
@@ -0,0 +1,18 @@
1
+ require 'uuid'
2
+ require 'fileutils'
3
+
4
+ module BetaBuilder
5
+ class ArchivedBuild
6
+ def initialize(configuration)
7
+ @configuration = configuration
8
+ @uuid = UUID.generate.upcase
9
+ end
10
+
11
+ def save_to(path)
12
+ archive_path = File.join(path, "#{@uuid}.apparchive")
13
+ FileUtils.mkdir(archive_path)
14
+ FileUtils.cp_r(@configuration.built_app_path, archive_path)
15
+ FileUtils.cp_r(@configuration.built_app_dsym_path, archive_path)
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betabuilder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luke Redpath
@@ -45,10 +45,11 @@ extra_rdoc_files:
45
45
  files:
46
46
  - LICENSE
47
47
  - README.md
48
+ - lib/beta_builder/archived_build.rb
48
49
  - lib/beta_builder.rb
49
50
  - lib/betabuilder.rb
50
51
  has_rdoc: false
51
- homepage: http://lukeredpath.co.uk
52
+ homepage: http://github.com/lukeredpath/betabuilder
52
53
  licenses: []
53
54
 
54
55
  post_install_message: