Kaynağa Gözat

Update Cocoapods (#1130)

Motivation:

We did a release, we should release new pods and update the version
number in docs too.

Modifications:

- Update pods
- Update docs
- Update pods script to sort dependencies by name (so diffs are more
  stable)

Result:

Cocoapods are available. Docs are more up-to-date.
George Barnett 5 yıl önce
ebeveyn
işleme
a43882db29

+ 1 - 1
CGRPCZlib.podspec

@@ -2,7 +2,7 @@ Pod::Spec.new do |s|
 
     s.name = 'CGRPCZlib'
     s.module_name = 'CGRPCZlib'
-    s.version = '1.0.0-alpha.24'
+    s.version = '1.0.0'
     s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
     s.summary = 'Compression library that provides in-memory compression and decompression functions'
     s.homepage = 'https://www.grpc.io'

+ 2 - 2
README.md

@@ -49,7 +49,7 @@ package dependency to your `Package.swift`:
 
 ```swift
 dependencies: [
-  .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0-alpha.23")
+  .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0")
 ]
 ```
 
@@ -82,7 +82,7 @@ gRPC Swift is currently available [from CocoaPods][pod-new]. To integrate, add
 the following line to your `Podfile`:
 
 ```ruby
-    pod 'gRPC-Swift', '~> 1.0.0-alpha.23'
+    pod 'gRPC-Swift', '~> 1.0.0'
 ```
 
 Then, run `pod install` from command line and use your project's generated

+ 1 - 1
docs/basic-tutorial.md

@@ -39,7 +39,7 @@ To download the example, clone the latest release in `grpc-swift` repository by
 running the following command:
 
 ```sh
-$ git clone -b 1.0.0-alpha.20 https://github.com/grpc/grpc-swift
+$ git clone -b 1.0.0 https://github.com/grpc/grpc-swift
 ```
 
 Then change your current directory to `grpc-swift/Sources/Examples/RouteGuide`:

+ 1 - 1
docs/quick-start.md

@@ -28,7 +28,7 @@ and other tutorials):
 
 ```sh
 $ # Clone the repository at the latest release to get the example code:
-$ git clone -b 1.0.0-alpha.20 https://github.com/grpc/grpc-swift
+$ git clone -b 1.0.0 https://github.com/grpc/grpc-swift
 $ # Navigate to the repository
 $ cd grpc-swift/
 ```

+ 1 - 1
gRPC-Swift-Plugins.podspec

@@ -1,7 +1,7 @@
 Pod::Spec.new do |s|
 
     s.name = 'gRPC-Swift-Plugins'
-    s.version = '1.0.0-alpha.24'
+    s.version = '1.0.0'
     s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
     s.summary = 'Swift gRPC code generator plugin binaries'
     s.homepage = 'https://www.grpc.io'

+ 6 - 6
gRPC-Swift.podspec

@@ -2,7 +2,7 @@ Pod::Spec.new do |s|
 
     s.name = 'gRPC-Swift'
     s.module_name = 'GRPC'
-    s.version = '1.0.0-alpha.24'
+    s.version = '1.0.0'
     s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
     s.summary = 'Swift gRPC code generator plugin and runtime library'
     s.homepage = 'https://www.grpc.io'
@@ -17,13 +17,13 @@ Pod::Spec.new do |s|
 
     s.source_files = 'Sources/GRPC/**/*.{swift,c,h}'
 
-    s.dependency 'SwiftProtobuf', '>= 1.9.0', '< 2.0.0'
+    s.dependency 'CGRPCZlib', s.version.to_s
+    s.dependency 'Logging', '>= 1.4.0', '< 2.0.0'
     s.dependency 'SwiftNIO', '>= 2.22.0', '< 3.0.0'
-    s.dependency 'SwiftNIOTransportServices', '>= 1.6.0', '< 2.0.0'
-    s.dependency 'SwiftNIOSSL', '>= 2.8.0', '< 3.0.0'
     s.dependency 'SwiftNIOExtras', '>= 1.4.0', '< 2.0.0'
-    s.dependency 'Logging', '>= 1.4.0', '< 2.0.0'
     s.dependency 'SwiftNIOHTTP2', '>= 1.16.1', '< 2.0.0'
-    s.dependency 'CGRPCZlib', s.version.to_s
+    s.dependency 'SwiftNIOSSL', '>= 2.8.0', '< 3.0.0'
+    s.dependency 'SwiftNIOTransportServices', '>= 1.6.0', '< 2.0.0'
+    s.dependency 'SwiftProtobuf', '>= 1.9.0', '< 2.0.0'
 
 end

+ 2 - 2
scripts/build_podspecs.py

@@ -83,7 +83,7 @@ class Pod:
 
             podspec += "\n" if len(self.dependencies) > 0 else ""
 
-        for dep in self.dependencies:
+        for dep in sorted(self.dependencies, key=lambda x: x.name):
             podspec += indent + str(dep) + "\n"
 
         podspec += "\nend"
@@ -105,7 +105,7 @@ class PodManager:
         subprocess.check_call(['pod', 'repo', 'update'])
         print('    Publishing %s.podspec' % (pod_name))
         subprocess.check_call(['pod', 'trunk', 'push', '--synchronous',
-                               self.directory + '/' + pod_name])
+                               self.directory + '/' + pod_name + ".podspec"])
 
     def build_pods(self):
         cgrpczlib_pod = Pod(