Skip to content

Commit 298d6c2

Browse files
authored
[Swift][client] make alamofire version more flexible and build projects on CI before running unit tests (#20913)
* [Swift][client] CI first build the projects then run the unit tests * [Swift][client] make alamofire version more flexible
1 parent 4c1257a commit 298d6c2

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{{#useAlamofire}}
2-
github "Alamofire/Alamofire" = 5.10.2{{/useAlamofire}}{{#usePromiseKit}}
2+
github "Alamofire/Alamofire" ~> 5.10{{/useAlamofire}}{{#usePromiseKit}}
33
github "mxcl/PromiseKit" ~> 8.1{{/usePromiseKit}}{{#useRxSwift}}
44
github "ReactiveX/RxSwift" ~> 6.8{{/useRxSwift}}

modules/openapi-generator/src/main/resources/swift6/Package.swift.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let package = Package(
2525
dependencies: [
2626
// Dependencies declare other packages that this package depends on.
2727
{{#useAlamofire}}
28-
.package(url: "https://github.com/Alamofire/Alamofire", exact: "5.10.2"),
28+
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.10.2")),
2929
{{/useAlamofire}}
3030
{{#usePromiseKit}}
3131
.package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "8.1.2")),

modules/openapi-generator/src/main/resources/swift6/Podspec.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
2727
{{/podDocumentationURL}}
2828
s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift'
2929
{{#useAlamofire}}
30-
s.dependency 'Alamofire', '5.10.2'
30+
s.dependency 'Alamofire', '~> 5.10'
3131
{{/useAlamofire}}
3232
{{#usePromiseKit}}
3333
s.dependency 'PromiseKit/CorePromise', '~> 8.1'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "Alamofire/Alamofire" = 5.10.2
1+
github "Alamofire/Alamofire" ~> 5.10

samples/client/petstore/swift6/alamofireLibrary/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
],
2020
dependencies: [
2121
// Dependencies declare other packages that this package depends on.
22-
.package(url: "https://github.com/Alamofire/Alamofire", exact: "5.10.2"),
22+
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.10.2")),
2323
],
2424
targets: [
2525
// Targets are the basic building blocks of a package. A target can define a module or a test suite.

samples/client/petstore/swift6/alamofireLibrary/PetstoreClient.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ Pod::Spec.new do |s|
1111
s.homepage = 'https://github.com/openapitools/openapi-generator'
1212
s.summary = 'PetstoreClient'
1313
s.source_files = 'Sources/PetstoreClient/**/*.swift'
14-
s.dependency 'Alamofire', '5.10.2'
14+
s.dependency 'Alamofire', '~> 5.10'
1515
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "Alamofire/Alamofire" = 5.10.2
1+
github "Alamofire/Alamofire" ~> 5.10
22
github "mxcl/PromiseKit" ~> 8.1
33
github "ReactiveX/RxSwift" ~> 6.8

samples/client/petstore/swift6/apiNonStaticMethod/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
],
2020
dependencies: [
2121
// Dependencies declare other packages that this package depends on.
22-
.package(url: "https://github.com/Alamofire/Alamofire", exact: "5.10.2"),
22+
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.10.2")),
2323
.package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "8.1.2")),
2424
.package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMajor(from: "6.8.0")),
2525
],

samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
1111
s.homepage = 'https://github.com/openapitools/openapi-generator'
1212
s.summary = 'PetstoreClient'
1313
s.source_files = 'Sources/PetstoreClient/**/*.swift'
14-
s.dependency 'Alamofire', '5.10.2'
14+
s.dependency 'Alamofire', '~> 5.10'
1515
s.dependency 'PromiseKit/CorePromise', '~> 8.1'
1616
s.dependency 'RxSwift', '~> 6.8'
1717
end

0 commit comments

Comments
 (0)