xcode-archive-cache 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ module XcodeArchiveCache
12
12
  output, status = Open3.capture2e(actual_command)
13
13
 
14
14
  if status.exitstatus != 0
15
- raise Informative, "#{command}\nexecution failed\n#{output}"
15
+ raise XcodeArchiveCache::Informative, "#{command}\nexecution failed\n#{output}"
16
16
  end
17
17
 
18
18
  output
@@ -31,6 +31,18 @@ module XcodeArchiveCache
31
31
  result
32
32
  end
33
33
 
34
+ # @param [String] command
35
+ # @param [Hash] env
36
+ #
37
+ # @return [Boolean] true if command succeeded and returned 0, false otherwise
38
+ #
39
+ def execute_with_env(command, env)
40
+ result = system(env, "set -x && '#{command}'")
41
+
42
+ return false if result == nil
43
+ result
44
+ end
45
+
34
46
  private
35
47
 
36
48
  # @param [String] command
@@ -57,12 +69,12 @@ module XcodeArchiveCache
57
69
  # @return [String]
58
70
  #
59
71
  def pipefail_flags(print_command)
60
- flags = %w(e o)
72
+ flags = ["e", "o pipefail"]
61
73
  if print_command
62
74
  flags.insert(1, "x")
63
75
  end
64
76
 
65
- "-" + flags.join("")
77
+ "-" + flags.join(" -")
66
78
  end
67
79
  end
68
80
  end
@@ -45,6 +45,11 @@ require 'injection/dependency_remover'
45
45
  require 'injection/headers_mover'
46
46
  require 'injection/storage'
47
47
  require 'injection/framework_embedder'
48
+ require 'injection/pods_xcframework_fixer'
49
+
50
+ require 'modulemap/file_handler'
51
+ require 'modulemap/header_path_extractor'
52
+ require 'modulemap/header_path_fixer'
48
53
 
49
54
  require 'runner/runner'
50
55
 
@@ -52,6 +57,9 @@ require 'shell/executor'
52
57
 
53
58
  require 'xcodebuild/executor'
54
59
 
60
+ require 'extensions/target'
61
+ require 'extensions/build_configuration'
62
+
55
63
  module XcodeArchiveCache
56
64
  class Informative < StandardError
57
65
  include CLAide::InformativeError
@@ -55,6 +55,10 @@ module XcodeArchiveCache
55
55
  shell_executor.execute(command, true)
56
56
  end
57
57
 
58
+ def set_up_for_simulator?
59
+ destination_flag.include?("Simulator")
60
+ end
61
+
58
62
  private
59
63
 
60
64
  # @return [String]
@@ -113,7 +117,7 @@ module XcodeArchiveCache
113
117
  #
114
118
  inferred_destination = action == ARCHIVE_ACTION ? GENERIC_DESTINATION : destination_by_platform
115
119
  if inferred_destination == nil
116
- raise Informative, "Destination not set for #{platform} platform"
120
+ raise XcodeArchiveCache::Informative, "Destination not set for #{platform} platform"
117
121
  end
118
122
 
119
123
  destination_specifier = inferred_destination == GENERIC_DESTINATION ? "generic/platform=#{platform}" : inferred_destination
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcode-archive-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Dyakonov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-13 00:00:00.000000000 Z
11
+ date: 2021-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj
@@ -36,20 +36,20 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '1.3'
39
+ version: '2.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '2.0'
42
+ version: '3.0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '1.3'
49
+ version: '2.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '2.0'
52
+ version: '3.0'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: xcpretty
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -78,8 +78,8 @@ dependencies:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
80
  version: '1.0'
81
- description:
82
- email:
81
+ description:
82
+ email:
83
83
  executables:
84
84
  - xcode-archive-cache
85
85
  extensions: []
@@ -107,14 +107,20 @@ files:
107
107
  - lib/command/inject.rb
108
108
  - lib/config/config.rb
109
109
  - lib/config/dsl.rb
110
+ - lib/extensions/build_configuration.rb
111
+ - lib/extensions/target.rb
110
112
  - lib/injection/build_flags_changer.rb
111
113
  - lib/injection/dependency_remover.rb
112
114
  - lib/injection/framework_embedder.rb
113
115
  - lib/injection/headers_mover.rb
114
116
  - lib/injection/injector.rb
115
117
  - lib/injection/pods_script_fixer.rb
118
+ - lib/injection/pods_xcframework_fixer.rb
116
119
  - lib/injection/storage.rb
117
120
  - lib/logs/logs.rb
121
+ - lib/modulemap/file_handler.rb
122
+ - lib/modulemap/header_path_extractor.rb
123
+ - lib/modulemap/header_path_fixer.rb
118
124
  - lib/runner/runner.rb
119
125
  - lib/shell/executor.rb
120
126
  - lib/xcode-archive-cache.rb
@@ -123,7 +129,7 @@ homepage: https://github.com/sweatco/xcode-archive-cache
123
129
  licenses:
124
130
  - MIT
125
131
  metadata: {}
126
- post_install_message:
132
+ post_install_message:
127
133
  rdoc_options: []
128
134
  require_paths:
129
135
  - lib
@@ -138,8 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
144
  - !ruby/object:Gem::Version
139
145
  version: '0'
140
146
  requirements: []
141
- rubygems_version: 3.0.4
142
- signing_key:
147
+ rubygems_version: 3.0.6
148
+ signing_key:
143
149
  specification_version: 4
144
150
  summary: Native targets cache for Xcode archive builds.
145
151
  test_files: []