fastlane-plugin-itargetchecker 0.3.0 → 0.4.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
  SHA256:
3
- metadata.gz: 79be675d00586c3d8251ea14ea36a3c5a34093d5dd4b374ba0c2d295f792b37f
4
- data.tar.gz: 63be800d35f1fb08839bc914eb9f871ca396b2cb4ab12b402519a6dd6ef6f2b8
3
+ metadata.gz: 0322c6e61ef29f77e7c8d7572e51879fc4f2c04c9d81de5c169d1b70d3064851
4
+ data.tar.gz: dcdc9cd9786b269423a9d2467c993459f7ebf3ec6a0c880b925427416b80d5e0
5
5
  SHA512:
6
- metadata.gz: f8027b28cf4baff207976202c6b407378d2f34134c99a1e7a6dfcd0e78989a3c2004e2b251ce11cbb314173e1364bc060331c901367945dfd168a4a732b7220a
7
- data.tar.gz: d09547f2f5b96b7a4de478bf0214874c84d2b147c1b78a1bc2591f0dfe9c4a6041bd2245d367882a3fab97836fb390d6541c4add55cf9c432efcd9c806a0d813
6
+ metadata.gz: f6f4df02f7dd296af19e24e8ebe0e2fa6bb210a0d7e0d91ad6457b85052e6de1788df8f31e31ac9c6fe9073ac35a65f9e20eaf86bce8a9bfe1d5e2043e4cdd40
7
+ data.tar.gz: cfb84ea57987016d10829d5138036b7446ae24bcd11ad293e03033c108ffd7ba762f5cdf1d82fd7ca25a5a38378d4579cf3e50471faea28c7be6fb970c813c3d
data/README.md CHANGED
@@ -9,6 +9,8 @@ Usualy this helps if you have a project with multiple targets and you want to ma
9
9
 
10
10
  At the first run you should check the plugin without passing some ignore files just to see what the plugin finds. After the first run, you should check for false alarms and add those files to youre custom ignore list.
11
11
 
12
+ **Attention!** You can use the plugin as a gem as well, without having to setup Fastlane(though it is recommended as it helps a lot)
13
+
12
14
  ## Getting Started
13
15
 
14
16
  This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin.
@@ -20,7 +22,7 @@ Shortcut for those who don't have time to read more:
20
22
  fastlane add_plugin fastlane-plugin-itargetchecker
21
23
  fastlane install_plugins
22
24
  ```
23
-
25
+
24
26
  After these you should be able to use the plugin as pointed in the example below.
25
27
 
26
28
 
@@ -31,6 +33,24 @@ You can now use regex in the ignored files strings passed to the plugin. That ca
31
33
 
32
34
  **Note:** The ignored files added in the sample should be changed to match your own rules.
33
35
 
36
+ ## Run as gem executable
37
+
38
+ If you don't want to install the plugin for fastlane, you can simply run ```gem install fastlane-plugin-itargetchecker``` and after that you should be able to use itargetchecker.
39
+
40
+ You can use the executable as following:
41
+
42
+ ```
43
+ bundle exec itargetchecker "yourProject.xcodeproj" "\w*\.framework\b*#\w*\.xcconfig\b*#\w*\.h\b*#Info.plist" "yourProjectTests"
44
+ ```
45
+
46
+
47
+ Basicaly the command takes 3 parameters:
48
+ 1. the xcodeproj file path
49
+ 2. the files to be ignored (if more than 1, # is used to split them -see the exemple above-)
50
+ 3. the targets to be ignored (if more than 1, # is used to split them -see the exemple above-)
51
+
52
+
53
+
34
54
  **Quick ussage sample:**
35
55
 
36
56
  ```ruby
File without changes
@@ -11,12 +11,14 @@ class ITargetChecker
11
11
  # loop through all the project files
12
12
  project.files.each do |file|
13
13
 
14
- faultyFile = file.name == nil || file.name == ""
14
+ faultyFile = false
15
+ fileName = file.path.split('/').last
16
+
15
17
  if ignoredFiles
16
18
  ignoredFiles.each do |ignoredItem|
17
- faultyFile = faultyFile || file.name.match(ignoredItem)
19
+ faultyFile = fileName.match(ignoredItem)
18
20
  if faultyFile
19
- next
21
+ break
20
22
  end
21
23
  end
22
24
  end
@@ -41,7 +43,8 @@ class ITargetChecker
41
43
  if correctTypes
42
44
  # get all files of a target
43
45
  buildPhase.files.each do |targetFile|
44
- if targetFile.display_name == file.name
46
+
47
+ if targetFile.file_ref.uuid == file.uuid
45
48
  found = true
46
49
  break
47
50
  end
@@ -50,11 +53,11 @@ class ITargetChecker
50
53
  end
51
54
 
52
55
  if found == false
53
- lostFiles.push("file: #{file.name} target: #{target}")
56
+ lostFiles.push("file: #{fileName} target: #{target} ")
54
57
  end
55
58
  end
56
59
  end
57
60
 
58
61
  lostFiles
59
62
  end
60
- end
63
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Itargetchecker
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-itargetchecker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Catalin Prata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-20 00:00:00.000000000 Z
11
+ date: 2018-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj