tflight 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/tflight +60 -0
  3. metadata +74 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c3c16bfd661f7b70fa13564c2d8f10eb4ee76c22
4
+ data.tar.gz: 23c4aa7e503fbc6c546bfad0a2af64d50a607c17
5
+ SHA512:
6
+ metadata.gz: 616be2b25ce248d99c86eac71376f838ea2b637f64e7bd968ce880972e6c68ef2aa8a5825739220130943b53033973d1b669808558de7420fa553e9252070a93
7
+ data.tar.gz: 1fe3d7d408e376979624147c00278d3752d5d4df01f2940f0d2f9e3c2afda63224a495caa6fda6864c6534dfb828e49e1f2fa6383f86f1343f16b722eb9dcdfb
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'commander/import'
5
+ require 'rest_client'
6
+ require 'json'
7
+
8
+ TESTFLIGHT_ENDPOINT = 'http://testflightapp.com/api/builds.json'
9
+
10
+ program :name, 'tflight'
11
+ program :version, '1.0.0'
12
+ program :description, 'One line deploy for all your beta testers.'
13
+
14
+ command :deploy do |c|
15
+ c.syntax = 'tflight deploy [options]'
16
+ c.summary = 'Builds, signs and deploys.'
17
+ c.description = 'This commands builds your application with all its dependencys, signs your .app file generating a .ipa and deploys it to testflight.'
18
+
19
+ c.option '--app String', 'The application you want to deploy'
20
+ c.option '--notes String', 'The release notes'
21
+
22
+ c.action do |args, options|
23
+
24
+ api_token = ENV['TESTFLIGHT_API_TOKEN']
25
+ team_token = ENV['TESTFLIGHT_TEAM_TOKEN']
26
+
27
+ config = JSON.parse File.read(".testflight")
28
+
29
+ unless (app_name = options.app)
30
+ say 'You need to provide the name of the app you want to deploy.'
31
+ abort
32
+ end
33
+
34
+ build_success = %x{xcodebuild -scheme '#{config['scheme']}' -workspace '#{config['workspace']}' -configuration #{config['configuration']}}
35
+ sign_success = %x{xcrun -sdk iphoneos PackageApplication -v '#{config['build_path']}/#{app_name}.app' -o ${PWD}/#{app_name}.ipa}
36
+
37
+ params = {
38
+
39
+ file: File.new("#{app_name}.ipa"),
40
+ api_token: api_token,
41
+ team_token: team_token,
42
+ notes: notes,
43
+ notify: config['notify'],
44
+ distribution_lists: config['distribution_list']
45
+
46
+ }
47
+
48
+ begin
49
+ response = RestClient.post(TESTFLIGHT_ENDPOINT,params, accetp: :json)
50
+ rescue => e
51
+ response = e.response
52
+ end
53
+
54
+ if (response.code == 200 || response.code == 201)
55
+ say "Upload succeeded, #{app_name} is now in the hands of all your beta testers :)."
56
+ else
57
+ say response
58
+ end
59
+ end
60
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tflight
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Martín Fernández
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: commander
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 4.1.6
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 4.1.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.6.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 1.6.0
41
+ description:
42
+ email:
43
+ - me@bilby91.com
44
+ executables:
45
+ - tflight
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - bin/tflight
50
+ homepage: http://github.com/bilby91/tflight
51
+ licenses:
52
+ - MIT
53
+ metadata: {}
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - bin
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 2.1.10
71
+ signing_key:
72
+ specification_version: 4
73
+ summary: tflight handles building, signing and pushing your app to beta testers.
74
+ test_files: []