betabuilder 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.4
2
+ * If the user has set the EDITOR environment variable, use it to obtain the TestFlight release notes.
3
+ * Bugfix: TestFlight API now returns a 201 Created response when successful.
4
+ * Bugfix: Handle spaces in build artefacts.
5
+ * Updated the default archived build location to match the newest Xcode archived build location.
6
+
1
7
  ## 0.3.2
2
8
  * Fixed bug #2 (task fails when no testflight distribution list set)
3
9
 
data/README.md CHANGED
@@ -39,6 +39,13 @@ Now, if you run `rake -T` in Terminal.app in the root of your project, the avail
39
39
 
40
40
  rake beta:build # Build the beta release of the app
41
41
  rake beta:package # Package the beta release as an IPA file
42
+
43
+ If you use a custom Xcode build directory, rather than the default `${SRCROOT}/build` location, you can configure that too:
44
+
45
+ BetaBuilder::Tasks.new do |config|
46
+ ...
47
+ config.build_dir = "/path/to/custom/build/dir"
48
+ end
42
49
 
43
50
  To deploy your beta to your testers, some additional configuration is needed (see the next section).
44
51
 
@@ -12,7 +12,7 @@ module BetaBuilder
12
12
  :configuration => "Adhoc",
13
13
  :build_dir => "build",
14
14
  :auto_archive => false,
15
- :archive_path => File.expand_path("~/Library/MobileDevice/Archived Applications/")
15
+ :archive_path => File.expand_path("~/Library/Application Support/Developer/Shared/Archived Applications")
16
16
  )
17
17
  @namespace = namespace
18
18
  yield @configuration if block_given?
@@ -21,7 +21,7 @@ module BetaBuilder
21
21
 
22
22
  class Configuration < OpenStruct
23
23
  def build_arguments
24
- "-target #{target} -configuration #{configuration} -sdk iphoneos"
24
+ "-target '#{target}' -configuration '#{configuration}' -sdk iphoneos"
25
25
  end
26
26
 
27
27
  def app_name
@@ -1,5 +1,7 @@
1
1
  require 'rest_client'
2
2
  require 'json'
3
+ require 'tmpdir'
4
+ require 'fileutils'
3
5
 
4
6
  module BetaBuilder
5
7
  module DeploymentStrategies
@@ -31,7 +33,7 @@ module BetaBuilder
31
33
  response = e.response
32
34
  end
33
35
 
34
- if response.code == 200
36
+ if (response.code == 201) || (response.code == 200)
35
37
  puts "Upload complete."
36
38
  else
37
39
  puts "Upload failed. (#{response})"
@@ -41,7 +43,20 @@ module BetaBuilder
41
43
  private
42
44
 
43
45
  def get_notes
44
- @configuration.release_notes || get_notes_using_prompt
46
+ @configuration.release_notes || get_notes_using_editor || get_notes_using_prompt
47
+ end
48
+
49
+ def get_notes_using_editor
50
+ return unless (editor = ENV["EDITOR"])
51
+
52
+ dir = Dir.mktmpdir
53
+ begin
54
+ filepath = "#{dir}/release_notes"
55
+ system("#{editor} #{filepath}")
56
+ notes = File.read(filepath)
57
+ ensure
58
+ rm_rf(dir)
59
+ end
45
60
  end
46
61
 
47
62
  def get_notes_using_prompt
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: 23
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 2
10
- version: 0.3.2
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luke Redpath
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-21 00:00:00 +00:00
18
+ date: 2011-01-24 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency