lib/produce/config.rb in produce-0.2.1 vs lib/produce/config.rb in produce-0.3.0

- old
+ new

@@ -4,11 +4,12 @@ bundle_identifier: "App Identifier (Bundle ID, e.g. com.krausefx.app): ", bundle_identifier_suffix: "App Identifier Suffix (Ignored if App Identifier does not ends with .*): ", app_name: "App Name: ", version: "Initial version number (e.g. '1.0'): ", sku: "SKU Number (e.g. '1234'): ", - primary_language: "Primary Language (e.g. 'English', 'German'): " + primary_language: "Primary Language (e.g. 'English', 'German'): ", + company_name: "Company name (Leave blank to leave the current one): " } # Left to prevent fastlane from crashing. Should be removed upon version bump. def self.shared_config end @@ -40,11 +41,11 @@ case key when :primary_language q.validate = lambda { |val| is_valid_language?(val) } q.responses[:not_valid] = "Please enter one of available languages: #{AvailableDefaultLanguages.all_languages}" else - q.validate = lambda { |val| !val.empty? } + q.validate = lambda { |val| !val.empty? } unless key == :company_name q.responses[:not_valid] = "#{key.to_s.gsub('_', ' ').capitalize} can't be blank" end end end @@ -65,15 +66,16 @@ hash = { bundle_identifier: ENV['PRODUCE_APP_IDENTIFIER'], bundle_identifier_suffix: ENV['PRODUCE_APP_IDENTIFIER_SUFFIX'], app_name: ENV['PRODUCE_APP_NAME'], version: ENV['PRODUCE_VERSION'], - sku: ENV['PRODUCE_SKU'], + sku: ENV['PRODUCE_SKU'] || Time.now.to_i.to_s, skip_itc: is_truthy?(ENV['PRODUCE_SKIP_ITC']), skip_devcenter: is_truthy?(ENV['PRODUCE_SKIP_DEVCENTER']), team_id: ENV['PRODUCE_TEAM_ID'], - team_name: ENV['PRODUCE_TEAM_NAME'] + team_name: ENV['PRODUCE_TEAM_NAME'], + company_name: ENV['PRODUCE_COMPANY_NAME'] } if ENV['PRODUCE_LANGUAGE'] language = valid_language(ENV['PRODUCE_LANGUAGE']) @@ -111,6 +113,6 @@ def is_truthy? value %w( true t 1 yes y ).include? value.to_s.downcase end end -end \ No newline at end of file +end