produce 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1d943a72c729b732c93e5296beff29dbfd8e8fc
4
- data.tar.gz: ba189da362633a440c7c0fbaa0e0da8cd56135a9
3
+ metadata.gz: 924d63e36bfea7f361256328ea281c4f20aea426
4
+ data.tar.gz: 8615920b97de8b01d9a526224bba9cc16be958d5
5
5
  SHA512:
6
- metadata.gz: 6be980fab023211da0f014da33865ab7a6e9eb4a9a4fa61b9a3e8bb831518ecc8306bab7a97118031e07ecfdf6fc6e74fedff986da48d3f6cecddf83bf4496c1
7
- data.tar.gz: 628e138521cc5b6ac37e4b96bac9868b483689948ca44a2618ac97e695b0b16a1f308b6c210368234c6a48d9e72a019d707338a0d6a02a08791bd8b1f026cd69
6
+ metadata.gz: 512bf0e5c45e7ba11fdd0fda494e26feff2d94a2a49523d09bb0c4f820d3f66b76f833d639b70f65b80df57f296f22524f06baaafd85e4d528875ddcb4a34a96
7
+ data.tar.gz: 7e7de9f95aca28999360a8025130ed85e69fce7b9c26fb8a482d8c7d6e8fc5e507b5cd392f95f244af51cd084c3bf7601942302116122770bf5b402300a606a7
data/README.md CHANGED
@@ -73,15 +73,18 @@ Get the latest list of all available parameters;
73
73
 
74
74
  ```
75
75
  -u, --username STRING Your Apple ID Username (PRODUCE_USERNAME)
76
- -b, --bundle_identifier STRING App Identifier (Bundle ID, e.g. com.krausefx.app) (PRODUCE_APP_IDENTIFIER)
76
+ -a, --app_identifier STRING App Identifier (Bundle ID, e.g. com.krausefx.app) (PRODUCE_APP_IDENTIFIER)
77
77
  -b, --bundle_identifier_suffix STRING App Identifier Suffix (Ignored if App Identifier does not ends with .*) (PRODUCE_APP_IDENTIFIER_SUFFIX)
78
- -a, --app_name STRING App Name (PRODUCE_APP_IDENTIFIER)
79
- -i, --initial_version STRING Initial version number (e.g. '1.0') (PRODUCE_VERSION)
80
- -s, --sku STRING SKU Number (e.g. '1234') (PRODUCE_SKU)
81
- -p, --primary_language STRING Primary Language (e.g. 'English', 'German') (PRODUCE_LANGUAGE)
78
+ -a, --app_name STRING App Name (PRODUCE_APP_NAME)
79
+ -v, --version STRING Initial version number (e.g. '1.0') (PRODUCE_VERSION)
80
+ -s, --sku SKU Number (e.g. '1234') (PRODUCE_SKU)
81
+ -l, --language STRING Primary Language (e.g. 'English', 'German') (PRODUCE_LANGUAGE)
82
82
  -i, --skip_itc Skip the creation of the app on iTunes Connect (PRODUCE_SKIP_ITC)
83
83
  -d, --skip_devcenter Skip the creation of the app on the Apple Developer Portal (PRODUCE_SKIP_DEVCENTER)
84
+ -t, --team_id STRING The ID of your team if you're in multiple teams (PRODUCE_TEAM_ID)
85
+ -l, --team_name STRING The name of your team if you're in multiple teams (PRODUCE_TEAM_NAME)
84
86
  -h, --help Display help documentation
87
+ -v, --version Display version information
85
88
  ```
86
89
 
87
90
  ## Environment Variables
@@ -95,8 +98,8 @@ In case you want to pass more information to `produce` using environment variabl
95
98
  - `PRODUCE_SKU` (the SKU you want to use, which must be a unique number)
96
99
  - `PRODUCE_SKIP_ITC` (should iTunes Connect app be created)
97
100
  - `PRODUCE_SKIP_DEVCENTER` (should Apple Developer Portal app be created)
98
- - `FASTLANE_TEAM_ID` (the Team ID, e.g. `Q2CBPK58CA`)
99
- - `FASTLANE_TEAM_NAME` (the Team Name, e.g. `Felix Krause`)
101
+ - `PRODUCE_TEAM_ID` (the Team ID, e.g. `Q2CBPK58CA`)
102
+ - `PRODUCE_TEAM_NAME` (the Team Name, e.g. `Felix Krause`)
100
103
 
101
104
 
102
105
  ## [`fastlane`](https://github.com/KrauseFx/fastlane) Integration
@@ -20,7 +20,7 @@ module Produce
20
20
  app_name = valid_name_for(Produce.config[:app_name])
21
21
  Helper.log.info "Creating new app '#{app_name}' on the Apple Dev Center".green
22
22
 
23
- app = Spaceship.app.create!(bundle_id: Produce.config[:bundle_identifier].to_s,
23
+ app = Spaceship.app.create!(bundle_id: app_identifier,
24
24
  name: app_name)
25
25
 
26
26
  Helper.log.info "Created app #{app.app_id}"
@@ -40,9 +40,13 @@ module Produce
40
40
  latinazed.gsub(/[^0-9A-Za-z\d\s]/, '') # remove non-valid characters
41
41
  end
42
42
 
43
+ def app_identifier
44
+ Produce.config[:app_identifier].to_s
45
+ end
46
+
43
47
  private
44
48
  def app_exists?
45
- Spaceship.app.find(Produce.config[:bundle_identifier].to_s) != nil
49
+ Spaceship.app.find(app_identifier) != nil
46
50
  end
47
51
 
48
52
  def login
@@ -4,7 +4,7 @@ module Produce
4
4
  class ItunesConnect
5
5
 
6
6
  def run
7
- @full_bundle_identifier = Produce.config[:bundle_identifier]
7
+ @full_bundle_identifier = app_identifier
8
8
  @full_bundle_identifier.gsub!('*', Produce.config[:bundle_identifier_suffix].to_s) if wildcard_bundle?
9
9
 
10
10
  Spaceship::Tunes.login(Produce.config[:username], nil)
@@ -15,7 +15,7 @@ module Produce
15
15
  def create_new_app
16
16
  application = fetch_application
17
17
  if application
18
- Helper.log.info "App '#{Produce.config[:app_name]}' exists already (#{application.apple_id}), nothing to do on iTunes Connect".green
18
+ Helper.log.info "App '#{Produce.config[:app_name]}' already exists (#{application.apple_id}), nothing to do on iTunes Connect".green
19
19
  # Nothing to do here
20
20
  else
21
21
  Helper.log.info "Creating new app '#{Produce.config[:app_name]}' on iTunes Connect".green
@@ -23,10 +23,10 @@ module Produce
23
23
  Produce.config[:bundle_identifier_suffix] = '' unless wildcard_bundle?
24
24
 
25
25
  Spaceship::Tunes::Application.create!(name: Produce.config[:app_name],
26
- primary_language: Produce.config[:primary_language],
27
- version: Produce.config[:initial_version],
28
- sku: Produce.config[:sku],
29
- bundle_id: Produce.config[:bundle_identifier],
26
+ primary_language: Produce.config[:language],
27
+ version: Produce.config[:version],
28
+ sku: Produce.config[:sku].to_s, # might be an int
29
+ bundle_id: app_identifier,
30
30
  bundle_id_suffix: Produce.config[:bundle_identifier_suffix])
31
31
  application = fetch_application
32
32
  raise "Something went wrong when creating the new app - it's not listed in the App's list" unless application
@@ -43,7 +43,11 @@ module Produce
43
43
  end
44
44
 
45
45
  def wildcard_bundle?
46
- return Produce.config[:bundle_identifier].end_with?("*")
46
+ return app_identifier.end_with?("*")
47
+ end
48
+
49
+ def app_identifier
50
+ Produce.config[:app_identifier].to_s
47
51
  end
48
52
  end
49
53
  end
@@ -13,7 +13,7 @@ module Produce
13
13
  verify_block: Proc.new do |value|
14
14
  CredentialsManager::PasswordManager.shared_manager(value)
15
15
  end),
16
- FastlaneCore::ConfigItem.new(key: :bundle_identifier,
16
+ FastlaneCore::ConfigItem.new(key: :app_identifier,
17
17
  env_name: "PRODUCE_APP_IDENTIFIER",
18
18
  description: "App Identifier (Bundle ID, e.g. com.krausefx.app)",
19
19
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
@@ -21,16 +21,17 @@ module Produce
21
21
  env_name: "PRODUCE_APP_IDENTIFIER_SUFFIX",
22
22
  description: "App Identifier Suffix (Ignored if App Identifier does not ends with .*)"),
23
23
  FastlaneCore::ConfigItem.new(key: :app_name,
24
- env_name: "PRODUCE_APP_IDENTIFIER",
24
+ env_name: "PRODUCE_APP_NAME",
25
25
  description: "App Name"),
26
- FastlaneCore::ConfigItem.new(key: :initial_version,
26
+ FastlaneCore::ConfigItem.new(key: :version,
27
27
  env_name: "PRODUCE_VERSION",
28
28
  description: "Initial version number (e.g. '1.0')"),
29
29
  FastlaneCore::ConfigItem.new(key: :sku,
30
30
  env_name: "PRODUCE_SKU",
31
31
  description: "SKU Number (e.g. '1234')",
32
- default_value: Time.now.to_i.to_s),
33
- FastlaneCore::ConfigItem.new(key: :primary_language,
32
+ default_value: Time.now.to_i.to_s,
33
+ is_string: false), # false, as we also allow integers
34
+ FastlaneCore::ConfigItem.new(key: :language,
34
35
  env_name: "PRODUCE_LANGUAGE",
35
36
  description: "Primary Language (e.g. 'English', 'German')",
36
37
  default_value: "English",
@@ -48,7 +49,25 @@ module Produce
48
49
  env_name: "PRODUCE_SKIP_DEVCENTER",
49
50
  description: "Skip the creation of the app on the Apple Developer Portal",
50
51
  is_string: false,
51
- default_value: false)
52
+ default_value: false),
53
+ FastlaneCore::ConfigItem.new(key: :team_id,
54
+ short_option: "-t",
55
+ env_name: "PRODUCE_TEAM_ID",
56
+ description: "The ID of your team if you're in multiple teams",
57
+ optional: true,
58
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
59
+ verify_block: Proc.new do |value|
60
+ ENV["FASTLANE_TEAM_ID"] = value
61
+ end),
62
+ FastlaneCore::ConfigItem.new(key: :team_name,
63
+ short_option: "-l",
64
+ env_name: "PRODUCE_TEAM_NAME",
65
+ description: "The name of your team if you're in multiple teams",
66
+ optional: true,
67
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_name),
68
+ verify_block: Proc.new do |value|
69
+ ENV["FASTLANE_TEAM_NAME"] = value
70
+ end),
52
71
 
53
72
  ]
54
73
  end
@@ -1,3 +1,3 @@
1
1
  module Produce
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: produce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause