danger-spm_version_updates 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e09f13ea3447749c8a464e7583af7df15daa485a2fd4859642686dfa099d6686
4
- data.tar.gz: 29cdfaae73b66e0288cd94c84b14d674f9ab2d1f6c3fd30431f31ad49b1d4fdc
3
+ metadata.gz: ef2e5e335b687cb26aefd6de7ba0163df2d1241d544e88d59acf3a7e26ba8bb5
4
+ data.tar.gz: 9ea013ec7d7cd8abed37a5db7f58060efc3af6045c21422b499e960396a427a2
5
5
  SHA512:
6
- metadata.gz: 885f9f92765ee4dad799321b3251cf8e8961196470b3e934d6ca25067cad96356759d88b845f1ccd2adde92008cc80239e57caa5d0f4833fefe1f6f49a0c9deb
7
- data.tar.gz: 124352559472f974630fb4a28d3fa436b7f30360a23cc21864c20939b47718047bffd08190e61676c429ee567306089c5e0c6c7dc69b451ea42185b486db7541
6
+ metadata.gz: 32c0dced84c03b383c7c2ba05c282789d6bff6ad9dbe270b42fabd0852ea22d023dc3837345825644866a0f139af71aa07fee73c8af504afe3d6e375ffbdbf76
7
+ data.tar.gz: 92dce851350eb57e2b7ef319945ed038e9568e89a43fd3d58271af6ed75e7fc4f2279765daade7db3840d4b313cdae4f4867a9e8ca82f15ac78e07c628fc8d30
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-spm_version_updates (0.0.3)
4
+ danger-spm_version_updates (0.0.4)
5
5
  danger-plugin-api (~> 1.0)
6
6
  semantic (~> 1.6)
7
7
  xcodeproj (~> 1.23)
data/README.md CHANGED
@@ -23,11 +23,10 @@ gem "danger-spm_version_updates"
23
23
 
24
24
  ## Usage
25
25
 
26
- Just add this to your Dangerfile! Note that it is required to configure the path to your Xcode project.
26
+ Just add this to your Dangerfile! Note that it is required to pass the path to your Xcode project.
27
27
 
28
28
  ```ruby
29
- spm_version_updates.xcodeproj_path = ".../Example.xcodeproj"
30
- spm_version_updates.check_for_updates
29
+ spm_version_updates.check_for_updates("Example.xcodeproj")
31
30
  ```
32
31
 
33
32
  You can also configure custom behaviors:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpmVersionUpdates
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
@@ -65,11 +65,14 @@ module Danger
65
65
  next if available_versions.first.to_s == resolved_version
66
66
 
67
67
  if kind == "exactVersion" && @check_when_exact
68
+ newestVersion = available_versions.find { |version|
69
+ report_pre_releases ? true : version.pre.nil?
70
+ }
68
71
  warn(
69
72
  <<-TEXT
70
- Newer version of #{name}: #{available_versions.first} (but this package is set to exact version #{resolved_version})
73
+ Newer version of #{name}: #{newestVersion} (but this package is set to exact version #{resolved_version})
71
74
  TEXT
72
- )
75
+ ) unless newestVersion.to_s == resolved_version
73
76
  elsif kind == "upToNextMajorVersion"
74
77
  warn_for_new_versions(:major, available_versions, name, resolved_version)
75
78
  elsif kind == "upToNextMinorVersion"
@@ -137,6 +140,8 @@ Newest version of #{name}: #{available_versions.first} (but this package is conf
137
140
  warn("Newer version of #{name}: #{available_versions.first}")
138
141
  else
139
142
  newest_meeting_reqs = available_versions.find { |version|
143
+ puts version
144
+ puts version.pre.nil?
140
145
  version.send(major_or_minor) == resolved_version.send(major_or_minor) && report_pre_releases ? true : version.pre.nil?
141
146
  }
142
147
  warn("Newer version of #{name}: #{newest_meeting_reqs}") unless newest_meeting_reqs == resolved_version
@@ -47,6 +47,37 @@ module Danger
47
47
  ]
48
48
  )
49
49
  end
50
+
51
+ it "Does not report pre-release versions by default" do
52
+ allow(@my_plugin).to receive(:git_versions).and_return [
53
+ Semantic::Version.new("12.0.0"),
54
+ Semantic::Version.new("12.0.0-beta.1"),
55
+ Semantic::Version.new("12.0.0-beta.2"),
56
+ Semantic::Version.new("12.0.0-beta.3"),
57
+ Semantic::Version.new("12.0.0-beta.4"),
58
+ Semantic::Version.new("12.0.0-beta.5"),
59
+ Semantic::Version.new("12.0.0-rc.1"),
60
+ Semantic::Version.new("12.1.0"),
61
+ Semantic::Version.new("12.1.1"),
62
+ Semantic::Version.new("12.1.2"),
63
+ Semantic::Version.new("12.1.3"),
64
+ Semantic::Version.new("12.1.4"),
65
+ Semantic::Version.new("12.1.5"),
66
+ Semantic::Version.new("12.1.6"),
67
+ Semantic::Version.new("12.2.0-beta.1"),
68
+ Semantic::Version.new("12.2.0-beta.2"),
69
+ ]
70
+ .sort
71
+ .reverse
72
+ @my_plugin.check_when_exact = true
73
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/HasPreRelease.xcodeproj")
74
+
75
+ expect(@dangerfile.status_report[:warnings]).to eq(
76
+ [
77
+ "Newer version of kean/Nuke: 12.2.0-beta.2 (but this package is set to exact version 12.1.6)\n",
78
+ ]
79
+ )
80
+ end
50
81
  end
51
82
  end
52
83
  end
@@ -0,0 +1,80 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 54;
7
+ objects = {
8
+ /* Begin PBXGroup section */
9
+ F1465EF423AA94BF0055F7C3 = {
10
+ isa = PBXGroup;
11
+ children = (
12
+ F1465EFF23AA94BF0055F7C3 /* Demo */,
13
+ );
14
+ sourceTree = "<group>";
15
+ };
16
+ F1465EFF23AA94BF0055F7C3 /* Demo */ = {
17
+ isa = PBXGroup;
18
+ children = ();
19
+ path = Demo;
20
+ sourceTree = "<group>";
21
+ };
22
+ /* End PBXGroup section */
23
+
24
+ /* Begin PBXProject section */
25
+ F1465EF523AA94BF0055F7C3 /* Project object */ = {
26
+ isa = PBXProject;
27
+ attributes = {
28
+ BuildIndependentTargetsInParallel = YES;
29
+ LastSwiftUpdateCheck = 1420;
30
+ LastUpgradeCheck = 1420;
31
+ TargetAttributes = {
32
+ F1465EFC23AA94BF0055F7C3 = {
33
+ CreatedOnToolsVersion = 11.2.1;
34
+ };
35
+ };
36
+ };
37
+ buildConfigurationList = F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXProject "Demo" */;
38
+ compatibilityVersion = "Xcode 9.3";
39
+ developmentRegion = en;
40
+ hasScannedForEncodings = 0;
41
+ knownRegions = (
42
+ en,
43
+ Base,
44
+ es,
45
+ "zh-Hans",
46
+ fr,
47
+ );
48
+ mainGroup = F1465EF423AA94BF0055F7C3;
49
+ packageReferences = (
50
+ 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */,
51
+ );
52
+ productRefGroup = F1465EFE23AA94BF0055F7C3 /* Products */;
53
+ projectDirPath = "";
54
+ projectRoot = "";
55
+ targets = ();
56
+ };
57
+ /* End PBXProject section */
58
+
59
+ /* Begin XCConfigurationList section */
60
+ F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXNativeTarget "Demo" */ = {
61
+ isa = XCConfigurationList;
62
+ buildConfigurations = ();
63
+ defaultConfigurationIsVisible = 0;
64
+ defaultConfigurationName = Release;
65
+ };
66
+ /* End XCConfigurationList section */
67
+
68
+ /* Begin XCRemoteSwiftPackageReference section */
69
+ 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */ = {
70
+ isa = XCRemoteSwiftPackageReference;
71
+ repositoryURL = "https://github.com/kean/Nuke";
72
+ requirement = {
73
+ kind = exactVersion;
74
+ version = 12.1.6;
75
+ };
76
+ };
77
+ /* End XCRemoteSwiftPackageReference section */
78
+ };
79
+ rootObject = F1465EF523AA94BF0055F7C3 /* Project object */;
80
+ }
@@ -0,0 +1,265 @@
1
+ {
2
+ "pins" : [
3
+ {
4
+ "identity" : "abseil-cpp-binary",
5
+ "kind" : "remoteSourceControl",
6
+ "location" : "https://github.com/google/abseil-cpp-binary.git",
7
+ "state" : {
8
+ "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
9
+ "version" : "1.2022062300.0"
10
+ }
11
+ },
12
+ {
13
+ "identity" : "analytics-swift",
14
+ "kind" : "remoteSourceControl",
15
+ "location" : "git@github.com:hbmartin/analytics-swift.git",
16
+ "state" : {
17
+ "branch" : "main",
18
+ "revision" : "81ed4a83fc87ef074bb71b2b0bced199811dc3bb"
19
+ }
20
+ },
21
+ {
22
+ "identity" : "firebase-ios-sdk",
23
+ "kind" : "remoteSourceControl",
24
+ "location" : "https://github.com/firebase/firebase-ios-sdk",
25
+ "state" : {
26
+ "revision" : "8a8ec57a272e0d31480fb0893dda0cf4f769b57e",
27
+ "version" : "10.15.0"
28
+ }
29
+ },
30
+ {
31
+ "identity" : "googleappmeasurement",
32
+ "kind" : "remoteSourceControl",
33
+ "location" : "https://github.com/google/GoogleAppMeasurement.git",
34
+ "state" : {
35
+ "revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b",
36
+ "version" : "10.13.0"
37
+ }
38
+ },
39
+ {
40
+ "identity" : "googledatatransport",
41
+ "kind" : "remoteSourceControl",
42
+ "location" : "https://github.com/google/GoogleDataTransport.git",
43
+ "state" : {
44
+ "revision" : "aae45a320fd0d11811820335b1eabc8753902a40",
45
+ "version" : "9.2.5"
46
+ }
47
+ },
48
+ {
49
+ "identity" : "googleutilities",
50
+ "kind" : "remoteSourceControl",
51
+ "location" : "https://github.com/google/GoogleUtilities.git",
52
+ "state" : {
53
+ "revision" : "c38ce365d77b04a9a300c31061c5227589e5597b",
54
+ "version" : "7.11.5"
55
+ }
56
+ },
57
+ {
58
+ "identity" : "grpc-binary",
59
+ "kind" : "remoteSourceControl",
60
+ "location" : "https://github.com/google/grpc-binary.git",
61
+ "state" : {
62
+ "revision" : "f1b366129d1125be7db83247e003fc333104b569",
63
+ "version" : "1.50.2"
64
+ }
65
+ },
66
+ {
67
+ "identity" : "gtm-session-fetcher",
68
+ "kind" : "remoteSourceControl",
69
+ "location" : "https://github.com/google/gtm-session-fetcher.git",
70
+ "state" : {
71
+ "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
72
+ "version" : "3.1.1"
73
+ }
74
+ },
75
+ {
76
+ "identity" : "interop-ios-for-google-sdks",
77
+ "kind" : "remoteSourceControl",
78
+ "location" : "https://github.com/google/interop-ios-for-google-sdks.git",
79
+ "state" : {
80
+ "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
81
+ "version" : "100.0.0"
82
+ }
83
+ },
84
+ {
85
+ "identity" : "leveldb",
86
+ "kind" : "remoteSourceControl",
87
+ "location" : "https://github.com/firebase/leveldb.git",
88
+ "state" : {
89
+ "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
90
+ "version" : "1.22.2"
91
+ }
92
+ },
93
+ {
94
+ "identity" : "lookingglassui",
95
+ "kind" : "remoteSourceControl",
96
+ "location" : "https://github.com/ryanlintott/LookingGlassUI",
97
+ "state" : {
98
+ "revision" : "3257e1b5392a8b39e4620e09cfdb672d2be42855",
99
+ "version" : "0.3.1"
100
+ }
101
+ },
102
+ {
103
+ "identity" : "maplibre-gl-native-distribution",
104
+ "kind" : "remoteSourceControl",
105
+ "location" : "https://github.com/maplibre/maplibre-gl-native-distribution",
106
+ "state" : {
107
+ "revision" : "ffda61e298c1490d4860d5184e80d618aaadc089",
108
+ "version" : "5.13.0"
109
+ }
110
+ },
111
+ {
112
+ "identity" : "nanopb",
113
+ "kind" : "remoteSourceControl",
114
+ "location" : "https://github.com/firebase/nanopb.git",
115
+ "state" : {
116
+ "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
117
+ "version" : "2.30909.0"
118
+ }
119
+ },
120
+ {
121
+ "identity" : "nuke",
122
+ "kind" : "remoteSourceControl",
123
+ "location" : "https://github.com/kean/Nuke",
124
+ "state" : {
125
+ "revision" : "3f666f120b63ea7de57d42e9a7c9b47f8e7a290b",
126
+ "version" : "12.1.6"
127
+ }
128
+ },
129
+ {
130
+ "identity" : "phonenumberkit",
131
+ "kind" : "remoteSourceControl",
132
+ "location" : "https://github.com/marmelroy/PhoneNumberKit.git",
133
+ "state" : {
134
+ "revision" : "b456f2f9be10c1d183158220b831afd22697dd68",
135
+ "version" : "3.7.4"
136
+ }
137
+ },
138
+ {
139
+ "identity" : "promises",
140
+ "kind" : "remoteSourceControl",
141
+ "location" : "https://github.com/google/promises.git",
142
+ "state" : {
143
+ "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
144
+ "version" : "2.3.1"
145
+ }
146
+ },
147
+ {
148
+ "identity" : "sentry-cocoa",
149
+ "kind" : "remoteSourceControl",
150
+ "location" : "https://github.com/getsentry/sentry-cocoa.git",
151
+ "state" : {
152
+ "revision" : "14aa6e47b03b820fd2b338728637570b9e969994",
153
+ "version" : "8.12.0"
154
+ }
155
+ },
156
+ {
157
+ "identity" : "sovran-swift",
158
+ "kind" : "remoteSourceControl",
159
+ "location" : "https://github.com/segmentio/Sovran-Swift.git",
160
+ "state" : {
161
+ "revision" : "64f3b5150c282a34af4578188dce2fd597e600e3",
162
+ "version" : "1.1.0"
163
+ }
164
+ },
165
+ {
166
+ "identity" : "swift-algorithms",
167
+ "kind" : "remoteSourceControl",
168
+ "location" : "https://github.com/apple/swift-algorithms.git",
169
+ "state" : {
170
+ "revision" : "bcd4f369ac962bc3e5244c9df778739f8f5bdbf1",
171
+ "version" : "1.1.0"
172
+ }
173
+ },
174
+ {
175
+ "identity" : "swift-argument-parser",
176
+ "kind" : "remoteSourceControl",
177
+ "location" : "https://github.com/apple/swift-argument-parser.git",
178
+ "state" : {
179
+ "revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531",
180
+ "version" : "1.2.3"
181
+ }
182
+ },
183
+ {
184
+ "identity" : "swift-asn1",
185
+ "kind" : "remoteSourceControl",
186
+ "location" : "https://github.com/apple/swift-asn1.git",
187
+ "state" : {
188
+ "revision" : "3664efa98bd302ec90e5b27ee1c0649fbcc365bc"
189
+ }
190
+ },
191
+ {
192
+ "identity" : "swift-case-paths",
193
+ "kind" : "remoteSourceControl",
194
+ "location" : "https://github.com/pointfreeco/swift-case-paths",
195
+ "state" : {
196
+ "revision" : "5da6989aae464f324eef5c5b52bdb7974725ab81",
197
+ "version" : "1.0.0"
198
+ }
199
+ },
200
+ {
201
+ "identity" : "swift-custom-dump",
202
+ "kind" : "remoteSourceControl",
203
+ "location" : "https://github.com/pointfreeco/swift-custom-dump",
204
+ "state" : {
205
+ "revision" : "3efbfba0e4e56c7187cc19137ee16b7c95346b79",
206
+ "version" : "1.1.0"
207
+ }
208
+ },
209
+ {
210
+ "identity" : "swift-numerics",
211
+ "kind" : "remoteSourceControl",
212
+ "location" : "https://github.com/apple/swift-numerics.git",
213
+ "state" : {
214
+ "revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
215
+ "version" : "1.0.2"
216
+ }
217
+ },
218
+ {
219
+ "identity" : "swift-protobuf",
220
+ "kind" : "remoteSourceControl",
221
+ "location" : "https://github.com/apple/swift-protobuf.git",
222
+ "state" : {
223
+ "revision" : "cf62cdaea48b77f1a631e5cb3aeda6047c2cba1d",
224
+ "version" : "1.23.0"
225
+ }
226
+ },
227
+ {
228
+ "identity" : "swift-snapshot-testing",
229
+ "kind" : "remoteSourceControl",
230
+ "location" : "https://github.com/pointfreeco/swift-snapshot-testing",
231
+ "state" : {
232
+ "revision" : "696b86a6d151578bca7c1a2a3ed419a5f834d40f",
233
+ "version" : "1.13.0"
234
+ }
235
+ },
236
+ {
237
+ "identity" : "swift-syntax",
238
+ "kind" : "remoteSourceControl",
239
+ "location" : "https://github.com/apple/swift-syntax.git",
240
+ "state" : {
241
+ "revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
242
+ "version" : "509.0.0"
243
+ }
244
+ },
245
+ {
246
+ "identity" : "swiftui-navigation",
247
+ "kind" : "remoteSourceControl",
248
+ "location" : "https://github.com/pointfreeco/swiftui-navigation",
249
+ "state" : {
250
+ "revision" : "6eb293c49505d86e9e24232cb6af6be7fff93bd5",
251
+ "version" : "1.0.2"
252
+ }
253
+ },
254
+ {
255
+ "identity" : "xctest-dynamic-overlay",
256
+ "kind" : "remoteSourceControl",
257
+ "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
258
+ "state" : {
259
+ "revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
260
+ "version" : "1.0.2"
261
+ }
262
+ }
263
+ ],
264
+ "version" : 2
265
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-spm_version_updates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harold Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-13 00:00:00.000000000 Z
11
+ date: 2023-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -248,6 +248,8 @@ files:
248
248
  - spec/spm_version_updates_spec.rb
249
249
  - spec/support/fixtures/Example.xcodeproj/project.pbxproj
250
250
  - spec/support/fixtures/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
251
+ - spec/support/fixtures/HasPreRelease.xcodeproj/project.pbxproj
252
+ - spec/support/fixtures/HasPreRelease.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
251
253
  - spec/support/fixtures/github_pr.json
252
254
  homepage: https://github.com/hbmartin/danger-spm_version_updates
253
255
  licenses:
@@ -278,4 +280,6 @@ test_files:
278
280
  - spec/spm_version_updates_spec.rb
279
281
  - spec/support/fixtures/Example.xcodeproj/project.pbxproj
280
282
  - spec/support/fixtures/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
283
+ - spec/support/fixtures/HasPreRelease.xcodeproj/project.pbxproj
284
+ - spec/support/fixtures/HasPreRelease.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
281
285
  - spec/support/fixtures/github_pr.json