diff --git a/.scripts/bump.swift b/.scripts/bump.swift new file mode 100644 index 0000000..196b021 --- /dev/null +++ b/.scripts/bump.swift @@ -0,0 +1,30 @@ +import Foundation + +guard CommandLine.arguments.count > 1 else { + exit(1) +} +let version = CommandLine.arguments[1] + +let basePath = "../" +let files = (try? FileManager.default.contentsOfDirectory(atPath: basePath)) ?? [] +let specs = files.filter { $0.range(of: ".podspec") != nil } +for path in specs { + print(path) + let path = basePath + path + guard var content = try? String(contentsOfFile: path) as NSString, + let regex = try? NSRegularExpression(pattern: "s\\.version\\ +=\\ +'(.+)'", options: []) else { + exit(1) + } + let result = regex.firstMatch(in: String(content), options: [], range: NSRange(location: 0, length: content.length)) + if let range = result.flatMap({ + $0.range(at: 1) + }) { + content = content.replacingCharacters(in: range, with: version) as NSString + do { + try String(content).write(toFile: path, atomically: false, encoding: .utf8) + } catch { + exit(1) + } + } +} + diff --git a/.scripts/pod_lib.sh b/.scripts/pod_lib.sh index 9749260..743db6b 100644 --- a/.scripts/pod_lib.sh +++ b/.scripts/pod_lib.sh @@ -25,4 +25,3 @@ for pod in $(find . -name "*.podspec" -type f -exec basename {} ';' );do exit $result fi done -pod_lint 'RxFirebase.podspec' $push diff --git a/RxFirebase.podspec b/RxFirebase.podspec index 77c77f1..0b29591 100644 --- a/RxFirebase.podspec +++ b/RxFirebase.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'RxFirebase' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for Firebase.' # This description is used to generate tags and improve search results. diff --git a/RxFirebaseAuthentication.podspec b/RxFirebaseAuthentication.podspec index 1c01305..10e79dc 100644 --- a/RxFirebaseAuthentication.podspec +++ b/RxFirebaseAuthentication.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RxFirebaseAuthentication' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for FirebaseAuth.' # This description is used to generate tags and improve search results. diff --git a/RxFirebaseDatabase.podspec b/RxFirebaseDatabase.podspec index 71cc3f5..21b2610 100644 --- a/RxFirebaseDatabase.podspec +++ b/RxFirebaseDatabase.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RxFirebaseDatabase' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for FirebaseDatabase.' # This description is used to generate tags and improve search results. diff --git a/RxFirebaseFirestore.podspec b/RxFirebaseFirestore.podspec index fe424ea..2a35b75 100644 --- a/RxFirebaseFirestore.podspec +++ b/RxFirebaseFirestore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RxFirebaseFirestore' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for FirebaseFirestore.' # This description is used to generate tags and improve search results. diff --git a/RxFirebaseFunctions.podspec b/RxFirebaseFunctions.podspec index e6d36cc..53b4e0b 100644 --- a/RxFirebaseFunctions.podspec +++ b/RxFirebaseFunctions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RxFirebaseFunctions' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for FirebaseFunctions.' # This description is used to generate tags and improve search results. diff --git a/RxFirebaseRemoteConfig.podspec b/RxFirebaseRemoteConfig.podspec index b96feff..d6eee44 100644 --- a/RxFirebaseRemoteConfig.podspec +++ b/RxFirebaseRemoteConfig.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RxFirebaseRemoteConfig' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for FirebaseFirestore.' # This description is used to generate tags and improve search results. diff --git a/RxFirebaseStorage.podspec b/RxFirebaseStorage.podspec index d98ff09..40d0d0f 100644 --- a/RxFirebaseStorage.podspec +++ b/RxFirebaseStorage.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'RxFirebaseStorage' - s.version = '0.3.2' + s.version = '0.3.3' s.summary = 'RxSwift extensions for FirebaseStorage.' # This description is used to generate tags and improve search results.