produce 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/produce +3 -3
- data/lib/produce/dependency_checker.rb +2 -2
- data/lib/produce/developer_center.rb +10 -10
- data/lib/produce/group.rb +5 -5
- data/lib/produce/itunes_connect.rb +24 -24
- data/lib/produce/options.rb +7 -8
- data/lib/produce/service.rb +4 -4
- data/lib/produce/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca2fa0c79d6eed1ca6e279042fce117a366aaa6c
|
4
|
+
data.tar.gz: 104523717bb390a6b1bd7142310305a760b4c639
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7367d265ee0619ec0cda56b27f34eebca37c4d6736593b20a29b000ed13d3276c3e2581643a291b9081adc5fb3abf6721472f8e27dd0f9e60c836a149c8c06e3
|
7
|
+
data.tar.gz: 6e8570aba6f5902e7ea79cd506297989ceb1d936ccddd72b3e708117a9d273cbc3f77ebcd2546b92efb7685099e5c7aa148314b04746911a6dcf27e62497c9f3
|
data/bin/produce
CHANGED
@@ -52,7 +52,7 @@ class ProduceApplication
|
|
52
52
|
|
53
53
|
c.action do |args, options|
|
54
54
|
# Filter the options so that we can still build the configuration
|
55
|
-
allowed_keys = Produce::Options.available_options.collect
|
55
|
+
allowed_keys = Produce::Options.available_options.collect(&:key)
|
56
56
|
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
|
57
57
|
|
58
58
|
require 'produce/service'
|
@@ -79,7 +79,7 @@ class ProduceApplication
|
|
79
79
|
|
80
80
|
c.action do |args, options|
|
81
81
|
# Filter the options so that we can still build the configuration
|
82
|
-
allowed_keys = Produce::Options.available_options.collect
|
82
|
+
allowed_keys = Produce::Options.available_options.collect(&:key)
|
83
83
|
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
|
84
84
|
|
85
85
|
require 'produce/service'
|
@@ -96,7 +96,7 @@ class ProduceApplication
|
|
96
96
|
c.option '-g', '--group_identifier STRING', String, 'Group identifier for the group (PRODUCE_GROUP_IDENTIFIER)'
|
97
97
|
|
98
98
|
c.action do |args, options|
|
99
|
-
allowed_keys = Produce::Options.available_options.collect
|
99
|
+
allowed_keys = Produce::Options.available_options.collect(&:key)
|
100
100
|
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
|
101
101
|
|
102
102
|
require 'produce/group'
|
@@ -5,7 +5,7 @@ module Produce
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.check_xcode_select
|
8
|
-
unless `xcode-select -v`.include?"xcode-select version "
|
8
|
+
unless `xcode-select -v`.include? "xcode-select version "
|
9
9
|
Helper.log.fatal '#############################################################'
|
10
10
|
Helper.log.fatal "# You have to install the Xcode commdand line tools to use produce"
|
11
11
|
Helper.log.fatal "# Install the latest version of Xcode from the AppStore"
|
@@ -15,4 +15,4 @@ module Produce
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|
@@ -3,7 +3,6 @@ require 'babosa'
|
|
3
3
|
|
4
4
|
module Produce
|
5
5
|
class DeveloperCenter
|
6
|
-
|
7
6
|
def run
|
8
7
|
login
|
9
8
|
create_new_app
|
@@ -19,12 +18,12 @@ module Produce
|
|
19
18
|
else
|
20
19
|
app_name = valid_name_for(Produce.config[:app_name])
|
21
20
|
Helper.log.info "Creating new app '#{app_name}' on the Apple Dev Center".green
|
22
|
-
|
21
|
+
|
23
22
|
app = Spaceship.app.create!(bundle_id: app_identifier,
|
24
23
|
name: app_name)
|
25
24
|
|
26
25
|
Helper.log.info "Created app #{app.app_id}"
|
27
|
-
|
26
|
+
|
28
27
|
raise "Something went wrong when creating the new app - it's not listed in the apps list" unless app_exists?
|
29
28
|
|
30
29
|
ENV["CREATED_NEW_APP_ID"] = Time.now.to_i.to_s
|
@@ -45,13 +44,14 @@ module Produce
|
|
45
44
|
end
|
46
45
|
|
47
46
|
private
|
48
|
-
def app_exists?
|
49
|
-
Spaceship.app.find(app_identifier) != nil
|
50
|
-
end
|
51
47
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
48
|
+
def app_exists?
|
49
|
+
Spaceship.app.find(app_identifier) != nil
|
50
|
+
end
|
51
|
+
|
52
|
+
def login
|
53
|
+
Spaceship.login(Produce.config[:username], nil)
|
54
|
+
Spaceship.select_team
|
55
|
+
end
|
56
56
|
end
|
57
57
|
end
|
data/lib/produce/group.rb
CHANGED
@@ -3,7 +3,7 @@ require 'babosa'
|
|
3
3
|
|
4
4
|
module Produce
|
5
5
|
class Group
|
6
|
-
def create(options,
|
6
|
+
def create(options, _args)
|
7
7
|
login
|
8
8
|
|
9
9
|
ENV["CREATED_NEW_GROUP_ID"] = Time.now.to_i.to_s
|
@@ -39,16 +39,16 @@ module Produce
|
|
39
39
|
return true
|
40
40
|
end
|
41
41
|
|
42
|
-
def associate(
|
42
|
+
def associate(_options, args)
|
43
43
|
login
|
44
44
|
|
45
45
|
if !app_exists?
|
46
46
|
Helper.log.info "[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist, nothing to associate with the groups".red
|
47
47
|
else
|
48
48
|
app = Spaceship.app.find(app_identifier)
|
49
|
-
raise "Something went wrong when fetching the app - it's not listed in the apps list"
|
49
|
+
raise "Something went wrong when fetching the app - it's not listed in the apps list" if app.nil?
|
50
50
|
|
51
|
-
new_groups =
|
51
|
+
new_groups = []
|
52
52
|
|
53
53
|
Helper.log.info "Validating groups before association"
|
54
54
|
|
@@ -79,7 +79,7 @@ module Produce
|
|
79
79
|
Produce.config[:app_identifier].to_s
|
80
80
|
end
|
81
81
|
|
82
|
-
def app_group_exists?
|
82
|
+
def app_group_exists?(identifier)
|
83
83
|
Spaceship.app_group.find(identifier) != nil
|
84
84
|
end
|
85
85
|
|
@@ -2,7 +2,6 @@ require 'spaceship'
|
|
2
2
|
|
3
3
|
module Produce
|
4
4
|
class ItunesConnect
|
5
|
-
|
6
5
|
def run
|
7
6
|
@full_bundle_identifier = app_identifier
|
8
7
|
@full_bundle_identifier.gsub!('*', Produce.config[:bundle_identifier_suffix].to_s) if wildcard_bundle?
|
@@ -22,11 +21,11 @@ module Produce
|
|
22
21
|
|
23
22
|
Produce.config[:bundle_identifier_suffix] = '' unless wildcard_bundle?
|
24
23
|
|
25
|
-
Spaceship::Tunes::Application.create!(name: Produce.config[:app_name],
|
24
|
+
Spaceship::Tunes::Application.create!(name: Produce.config[:app_name],
|
26
25
|
primary_language: language,
|
27
|
-
version: Produce.config[:app_version],
|
26
|
+
version: Produce.config[:app_version],
|
28
27
|
sku: Produce.config[:sku].to_s, # might be an int
|
29
|
-
bundle_id: app_identifier,
|
28
|
+
bundle_id: app_identifier,
|
30
29
|
bundle_id_suffix: Produce.config[:bundle_identifier_suffix],
|
31
30
|
company_name: Produce.config[:company_name])
|
32
31
|
application = fetch_application
|
@@ -39,32 +38,33 @@ module Produce
|
|
39
38
|
end
|
40
39
|
|
41
40
|
private
|
42
|
-
def fetch_application
|
43
|
-
Spaceship::Application.find(@full_bundle_identifier)
|
44
|
-
end
|
45
41
|
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
def fetch_application
|
43
|
+
Spaceship::Application.find(@full_bundle_identifier)
|
44
|
+
end
|
49
45
|
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
def wildcard_bundle?
|
47
|
+
return app_identifier.end_with?("*")
|
48
|
+
end
|
53
49
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
def language
|
58
|
-
@language = Produce.config[:language]
|
50
|
+
def app_identifier
|
51
|
+
Produce.config[:app_identifier].to_s
|
52
|
+
end
|
59
53
|
|
60
|
-
|
61
|
-
|
54
|
+
# Makes sure to get the value for the language
|
55
|
+
# Instead of using the user's value `UK English` spaceship should send
|
56
|
+
# `English_UK` to the server
|
57
|
+
def language
|
58
|
+
@language = Produce.config[:language]
|
62
59
|
|
63
|
-
|
64
|
-
|
65
|
-
end
|
60
|
+
converted = Spaceship::Tunes::LanguageConverter.from_itc_readable_to_itc(@language)
|
61
|
+
@language = converted if converted # overwrite it with the actual value
|
66
62
|
|
67
|
-
|
63
|
+
unless AvailableDefaultLanguages.all_languages.include?(@language)
|
64
|
+
raise "Please enter one of available languages: #{AvailableDefaultLanguages.all_languages}".red
|
68
65
|
end
|
66
|
+
|
67
|
+
return @language
|
68
|
+
end
|
69
69
|
end
|
70
70
|
end
|
data/lib/produce/options.rb
CHANGED
@@ -12,6 +12,7 @@ module Produce
|
|
12
12
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
|
13
13
|
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
14
14
|
env_name: "PRODUCE_APP_IDENTIFIER",
|
15
|
+
short_option: "-a",
|
15
16
|
description: "App Identifier (Bundle ID, e.g. com.krausefx.app)",
|
16
17
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
|
17
18
|
FastlaneCore::ConfigItem.new(key: :bundle_identifier_suffix,
|
@@ -36,16 +37,14 @@ module Produce
|
|
36
37
|
env_name: "PRODUCE_LANGUAGE",
|
37
38
|
description: "Primary Language (e.g. 'English', 'German')",
|
38
39
|
default_value: "English",
|
39
|
-
verify_block:
|
40
|
-
|
40
|
+
verify_block: proc do |language|
|
41
41
|
end),
|
42
42
|
FastlaneCore::ConfigItem.new(key: :company_name,
|
43
43
|
short_option: "-c",
|
44
44
|
env_name: "PRODUCE_COMPANY_NAME",
|
45
45
|
description: "The name of your comapny. Only required if it's the first app you create",
|
46
46
|
optional: true,
|
47
|
-
verify_block:
|
48
|
-
|
47
|
+
verify_block: proc do |language|
|
49
48
|
end),
|
50
49
|
FastlaneCore::ConfigItem.new(key: :skip_itc,
|
51
50
|
short_option: "-i",
|
@@ -65,8 +64,8 @@ module Produce
|
|
65
64
|
description: "The ID of your team if you're in multiple teams",
|
66
65
|
optional: true,
|
67
66
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
|
68
|
-
verify_block:
|
69
|
-
|
67
|
+
verify_block: proc do |value|
|
68
|
+
ENV["FASTLANE_TEAM_ID"] = value
|
70
69
|
end),
|
71
70
|
FastlaneCore::ConfigItem.new(key: :team_name,
|
72
71
|
short_option: "-l",
|
@@ -74,8 +73,8 @@ module Produce
|
|
74
73
|
description: "The name of your team if you're in multiple teams",
|
75
74
|
optional: true,
|
76
75
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_name),
|
77
|
-
verify_block:
|
78
|
-
|
76
|
+
verify_block: proc do |value|
|
77
|
+
ENV["FASTLANE_TEAM_NAME"] = value
|
79
78
|
end)
|
80
79
|
]
|
81
80
|
end
|
data/lib/produce/service.rb
CHANGED
@@ -8,7 +8,7 @@ module Produce
|
|
8
8
|
self.new.disable(options, args)
|
9
9
|
end
|
10
10
|
|
11
|
-
def enable(options,
|
11
|
+
def enable(options, _args)
|
12
12
|
unless app
|
13
13
|
Helper.log.info "[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist".red
|
14
14
|
return
|
@@ -20,7 +20,7 @@ module Produce
|
|
20
20
|
Helper.log.info "Done! Enabled #{enabled} services.".green
|
21
21
|
end
|
22
22
|
|
23
|
-
def disable(options,
|
23
|
+
def disable(options, _args)
|
24
24
|
unless app
|
25
25
|
Helper.log.info "[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist".red
|
26
26
|
return
|
@@ -34,8 +34,8 @@ module Produce
|
|
34
34
|
|
35
35
|
def valid_services_for(options)
|
36
36
|
allowed_keys = [:app_group, :associated_domains, :data_protection, :healthkit, :homekit,
|
37
|
-
|
38
|
-
|
37
|
+
:wireless_conf, :icloud, :inter_app_audio, :passbook, :push_notification, :vpn_conf]
|
38
|
+
options.__hash__.select { |key, value| allowed_keys.include? key }
|
39
39
|
end
|
40
40
|
|
41
41
|
def update(on, app, options)
|
data/lib/produce/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: produce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubyforge_project:
|
187
|
-
rubygems_version: 2.4.
|
187
|
+
rubygems_version: 2.4.5
|
188
188
|
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: Create new iOS apps on iTunes Connect and Dev Portal using the command line
|