fastlane 1.10.0 → 1.11.0

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: 1b02853674db4c9391b0afc92187c12553bd5ca5
4
- data.tar.gz: abdf86a0c1a16a537e0482b988ff466aa241b6a6
3
+ metadata.gz: bfcb5ded204d08df68eaa50cec21a6a879508d87
4
+ data.tar.gz: 5b3dce86931ddfb2939e7ceba712720ab0a5872a
5
5
  SHA512:
6
- metadata.gz: f74b8a54acbd869d226682e105a03e9e6ace60f9d87f145436538d081396d5701b0a7cad95fd987775a04b37b16458becdd56ba8aea3b72f73efe435ea00a57b
7
- data.tar.gz: a51ba8231bb61993678733fb47486a25e9e94759f80678dc4f570d45474857de291004d3d6e032afaf1c28471e779ebe325e9e1c0d03b3f4abe60fa6966aa4b9
6
+ metadata.gz: c777fe76041fc08a662fe94b5ec576d1737b5a85ea97120edefbe5f120acd3a393f7b75bdc5c10d45016a3b6050c36a47a63ff1c53af7b0b1d64336703388b62
7
+ data.tar.gz: 14f537a0a306363268a8a263d3880478869746f8ee388a14f6a12fb5ee32fc32461759124a78a556b31bf242df80d2b2147df8bac95e08f5ed215fca2711e2bf
@@ -0,0 +1,109 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ BACKUP_XCARCHIVE_FILE = :BACKUP_XCARCHIVE_FILE
5
+ end
6
+
7
+ class BackupXcarchiveAction < Action
8
+ require 'fileutils'
9
+
10
+ def self.run(params)
11
+ # Get params
12
+ xcarchive = params[:xcarchive]
13
+ base_destination = params[:destination]
14
+ zipped = params[:zip]
15
+ versioned = params[:versioned]
16
+
17
+ # Prepare destionation folder
18
+ full_destination = base_destination
19
+
20
+ if versioned
21
+ date = Time.now.strftime("%Y-%m-%d")
22
+ version = `agvtool what-marketing-version -terse1`
23
+ subfolder = "#{date} #{version.strip}"
24
+ full_destination = File.expand_path(subfolder, base_destination)
25
+ end
26
+
27
+ FileUtils.mkdir(full_destination) unless File.exists?(full_destination)
28
+
29
+ # Save archive to destination
30
+ if zipped
31
+ Helper.log.info "Compressing #{xcarchive}"
32
+
33
+ xcarchive_folder = File.expand_path(File.dirname(xcarchive))
34
+ xcarchive_file = File.basename(xcarchive)
35
+ zip_file = File.expand_path(File.join("#{xcarchive_file}.zip"))
36
+
37
+ # Create zip
38
+ Actions.sh(%Q[cd #{xcarchive_folder} && zip -r -X "#{zip_file}" "#{xcarchive_file}" > /dev/null])
39
+
40
+ # Moved to its final destination
41
+ FileUtils.mv(zip_file, full_destination)
42
+
43
+ Actions.lane_context[SharedValues::BACKUP_XCARCHIVE_FILE] = "#{full_destination}/#{File.basename(zip_file)}"
44
+ else
45
+ # Copy xcarchive file
46
+ FileUtils.cp_r(xcarchive, full_destination)
47
+
48
+ Actions.lane_context[SharedValues::BACKUP_XCARCHIVE_FILE] = "#{full_destination}/#{File.basename(xcarchive)}"
49
+ end
50
+
51
+ end
52
+
53
+ #####################################################
54
+ # @!group Documentation
55
+ #####################################################
56
+
57
+ def self.description
58
+ "Save your [zipped] xcarchive elsewhere from default path"
59
+ end
60
+
61
+ def self.available_options
62
+ [
63
+ FastlaneCore::ConfigItem.new(key: :xcarchive,
64
+ description: 'Path to your xcarchive file. Optional if you use the `xcodebuild` action',
65
+ default_value: Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE],
66
+ optional: false,
67
+ env_name: 'BACKUP_XCARCHIVE_ARCHIVE',
68
+ verify_block: Proc.new do |value|
69
+ raise "Couldn't find xcarchive file at path '#{value}'".red if !Helper.test? && !File.exists?(value)
70
+ end),
71
+ FastlaneCore::ConfigItem.new(key: :destination,
72
+ description: 'Where your archive will be placed',
73
+ optional: false,
74
+ env_name: 'BACKUP_XCARCHIVE_DESTINATION',
75
+ verify_block: Proc.new do |value|
76
+ raise "Couldn't find the destination folder at '#{value}'".red if !Helper.test? && !File.directory?(value) && !File.exists?(value)
77
+ end),
78
+ FastlaneCore::ConfigItem.new(key: :zip,
79
+ description: 'Enable compression of the archive. Default value `true`',
80
+ is_string: false,
81
+ default_value: true,
82
+ optional: true,
83
+ env_name: 'BACKUP_XCARCHIVE_ZIP'),
84
+ FastlaneCore::ConfigItem.new(key: :versioned,
85
+ description: 'Create a versioned (date and app version) subfolder where to put the archive. Default value `true`',
86
+ is_string: false,
87
+ default_value: true,
88
+ optional: true,
89
+ env_name: 'BACKUP_XCARCHIVE_VERSIONED')
90
+ ]
91
+ end
92
+
93
+ def self.output
94
+ [
95
+ ['BACKUP_XCARCHIVE_FILE', 'Path to your saved xcarchive (compressed) file']
96
+ ]
97
+ end
98
+
99
+ def self.author
100
+ ['dral3x']
101
+ end
102
+
103
+ def self.is_supported?(platform)
104
+ [:ios, :mac].include?platform
105
+ end
106
+
107
+ end
108
+ end
109
+ end
@@ -7,24 +7,16 @@ module Fastlane
7
7
  class ProduceAction < Action
8
8
  def self.run(params)
9
9
  require 'produce'
10
-
11
- raise 'Parameter of produce must be a hash'.red unless params.is_a?(Hash)
12
-
13
- params.each do |key, value|
14
- ENV[key.to_s.upcase] = value.to_s
15
- end
10
+ require 'produce/options'
16
11
 
17
12
  return if Helper.test?
18
13
 
19
- FastlaneCore::UpdateChecker.start_looking_for_update('produce') unless Helper.is_test?
20
-
21
14
  begin
15
+ FastlaneCore::UpdateChecker.start_looking_for_update('produce')
16
+ Produce.config = params # we alread have the finished config
17
+
22
18
  Dir.chdir(FastlaneFolder.path || Dir.pwd) do
23
19
  # This should be executed in the fastlane folder
24
-
25
- CredentialsManager::PasswordManager.shared_manager(ENV['PRODUCE_USERNAME']) if ENV['PRODUCE_USERNAME']
26
- Produce::Config.shared_config # to ask for missing information right in the beginning
27
-
28
20
  apple_id = Produce::Manager.start_producing.to_s
29
21
 
30
22
  Actions.lane_context[SharedValues::PRODUCE_APPLE_ID] = apple_id
@@ -36,29 +28,20 @@ module Fastlane
36
28
  end
37
29
 
38
30
  def self.description
39
- "Makes sure the given app identifier is created on the Dev Portal"
31
+ "Creates the given application on iTC and the Dev Portal if necessary"
40
32
  end
41
33
 
42
34
  def details
43
35
  [
44
36
  'For more information about produce, visit its GitHub page:',
45
- 'https://github.com/KrauseFx/produce'
37
+ 'https://github.com/fastlane/produce'
46
38
  ].join(' ')
47
39
  end
48
40
 
49
41
  def self.available_options
50
- [
51
- ['produce_app_identifier', 'The App Identifier of your app', 'PRODUCE_APP_IDENTIFIER'],
52
- ['produce_app_name', 'The name of your app', 'PRODUCE_APP_NAME'],
53
- ['produce_language', 'The app\'s default language', 'PRODUCE_LANGUAGE'],
54
- ['produce_version', 'The initial version of your app', 'PRODUCE_VERSION'],
55
- ['produce_sku', 'The SKU number of the app if it gets created', 'PRODUCE_SKU'],
56
- ['produce_team_name', 'optional: the name of your team', 'PRODUCE_TEAM_NAME'],
57
- ['produce_team_id', 'optional: the ID of your team', 'PRODUCE_TEAM_ID'],
58
- ['produce_username', 'optional: your Apple ID', 'PRODUCE_USERNAME'],
59
- ['produce_skip_itc', 'Skip the creation on iTunes Connect', 'PRODUCE_SKIP_ITC'],
60
- ['produce_skip_devcenter', 'Skip the creation on the Apple Developer Portal', 'PRODUCE_SKIP_DEVCENTER']
61
- ]
42
+ require 'produce'
43
+ require 'produce/options'
44
+ Produce::Options.available_options
62
45
  end
63
46
 
64
47
  def self.output
@@ -8,6 +8,7 @@ module Fastlane
8
8
  def self.run(params)
9
9
  $verbose = true if params[:verbose]
10
10
  clean = !params[:noclean]
11
+ build = !params[:nobuild]
11
12
 
12
13
  if Helper.test?
13
14
  Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] = Dir.pwd
@@ -23,7 +24,7 @@ module Fastlane
23
24
  begin
24
25
  Dir.chdir(params[:snapshot_file_path] || FastlaneFolder.path) do
25
26
  Snapshot::SnapshotConfig.shared_instance
26
- Snapshot::Runner.new.work(clean: clean)
27
+ Snapshot::Runner.new.work(clean: clean, build: build)
27
28
 
28
29
  results_path = Snapshot::SnapshotConfig.shared_instance.screenshots_path
29
30
 
@@ -56,7 +57,12 @@ module Fastlane
56
57
  default_value: FastlaneFolder.path || Dir.pwd, # defaults to fastlane folder
57
58
  verify_block: Proc.new do |value|
58
59
  raise "Couldn't find folder '#{value}'. Make sure to pass the path to the directory not the file!".red unless File.directory?(value)
59
- end)
60
+ end),
61
+ FastlaneCore::ConfigItem.new(key: :nobuild,
62
+ env_name: "FL_SNAPSHOT_NO_BUILD",
63
+ description: "Skip the build process and use a pre-built .app under your build_dir",
64
+ is_string: false,
65
+ default_value: false)
60
66
  ]
61
67
  end
62
68
 
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.10.0'
2
+ VERSION = '1.11.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
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-07-17 00:00:00.000000000 Z
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - ">="
270
270
  - !ruby/object:Gem::Version
271
- version: 0.3.5
271
+ version: 0.4.1
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - ">="
277
277
  - !ruby/object:Gem::Version
278
- version: 0.3.5
278
+ version: 0.4.1
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: bundler
281
281
  requirement: !ruby/object:Gem::Requirement
@@ -414,6 +414,7 @@ files:
414
414
  - lib/fastlane/actions/add_git_tag.rb
415
415
  - lib/fastlane/actions/appstore.rb
416
416
  - lib/fastlane/actions/backup_file.rb
417
+ - lib/fastlane/actions/backup_xcarchive.rb
417
418
  - lib/fastlane/actions/cert.rb
418
419
  - lib/fastlane/actions/chatwork.rb
419
420
  - lib/fastlane/actions/clean_build_artifacts.rb