refinement 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/refinement/analyzer.rb +28 -15
- data/lib/refinement/annotated_target.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04d0fd04129396944f17c5efc66a89026b71c0b43a7c38d083f0d520c119c422
|
4
|
+
data.tar.gz: 7b063936dffb285e47ae5caa5f62de942467f0b28dc030cfdf4a1d3470b123ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef024baa70c295bed8d38332a731b694dd0d5f3b33dace25369a7d0fb3addc9e3b8ccbd03ed8b3ea4d8b6cd4329b329e0622979a2958d64b82ee189e039fbf7
|
7
|
+
data.tar.gz: 487a66ddbd2db6944e2ca1b38b1d6cfb34d3c6941a246c783e4ea1826acdded0fa2136b9a033a8857a2474e1209c9a764c882b69d74ccc19df81bb6176f1ffa9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/lib/refinement/analyzer.rb
CHANGED
@@ -77,25 +77,38 @@ module Refinement
|
|
77
77
|
"Given: #{filter_scheme_for_build_action.inspect}."
|
78
78
|
end
|
79
79
|
|
80
|
-
if filter_when_scheme_has_changed
|
81
|
-
|
80
|
+
if !filter_when_scheme_has_changed &&
|
81
|
+
UsedPath.new(path: Pathname(scheme_path), inclusion_reason: 'scheme').find_in_changeset(changeset)
|
82
|
+
return scheme
|
83
|
+
end
|
82
84
|
|
83
|
-
|
84
|
-
|
85
|
+
changes_by_suite_name = Hash[annotate_targets!
|
86
|
+
.map { |at| [at.xcode_target.name, at.change_reason(level: change_level)] }]
|
85
87
|
|
86
|
-
|
88
|
+
doc = scheme.doc
|
87
89
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
90
|
+
xpaths = sections_to_filter.map { |section| "//*/#{section}/BuildableReference" }
|
91
|
+
xpaths.each do |xpath|
|
92
|
+
doc.get_elements(xpath).to_a.each do |buildable_reference|
|
93
|
+
suite_name = buildable_reference.attributes['BlueprintName']
|
94
|
+
if (change_reason = changes_by_suite_name[suite_name])
|
95
|
+
puts "#{suite_name} changed because #{change_reason}" if log_changes
|
96
|
+
next
|
97
|
+
end
|
98
|
+
puts "#{suite_name} did not change, removing from scheme" if log_changes
|
99
|
+
buildable_reference.parent.remove
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
if filter_scheme_for_build_action == :testing
|
104
|
+
doc.get_elements('//*/BuildActionEntry/BuildableReference').to_a.each do |buildable_reference|
|
105
|
+
suite_name = buildable_reference.attributes['BlueprintName']
|
106
|
+
if (change_reason = changes_by_suite_name[suite_name])
|
107
|
+
puts "#{suite_name} changed because #{change_reason}" if log_changes
|
108
|
+
next
|
98
109
|
end
|
110
|
+
puts "#{suite_name} did not change, setting to not build for testing" if log_changes
|
111
|
+
buildable_reference.parent.attributes['buildForTesting'] = 'NO'
|
99
112
|
end
|
100
113
|
end
|
101
114
|
|
@@ -57,7 +57,9 @@ module Refinement
|
|
57
57
|
change_reason = direct_change_reason
|
58
58
|
if distance_from_target.positive?
|
59
59
|
change_reason ||= Refinement.map_find(dependencies) do |dependency|
|
60
|
-
|
60
|
+
unless (dependency_change_reason = dependency.change_reason(level: [:at_most_n_away, level.last.pred]))
|
61
|
+
next
|
62
|
+
end
|
61
63
|
|
62
64
|
"dependency #{dependency} changed because #{dependency_change_reason}"
|
63
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|