Merge pull request #63 from TouchInstinct/carthage__without_binary

Carthage  without binary
This commit is contained in:
Ivan Smolin 2020-01-23 12:11:08 +03:00 committed by GitHub
commit de0b3b9da7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 26 deletions

3
.gitignore vendored
View File

@ -63,3 +63,6 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
# Touch Instinct custom
Downloads/

View File

@ -1,5 +1,8 @@
# Changelog
### 0.3.14
- **Update**: remove Carthage binary dependencies, update build scripts.
### 0.3.13
- **[Breaking change]**: `LabelTableViewCell` moved to `LeadKit`.
- **[Breaking change]**: Removed `PinLayout` dependency.

View File

@ -1,10 +1,5 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json"
github "krzyzanowskim/CryptoSwift"
github "TouchInstinct/LeadKit"
github "petropavel13/SwiftValidator"
github "kishikawakatsumi/KeychainAccess"
github "layoutBox/PinLayout"

View File

@ -1,10 +1,12 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json" "4.8.1"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json" "0.14.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json" "3.2.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json" "0.9.15"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json" "4.3.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json" "4.4.2"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" "5.1.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json" "5.0.0"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json" "2.10008.1"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json" "1.1.0"
github "Alamofire/Alamofire" "4.9.1"
github "ReactiveX/RxSwift" "4.5.0"
github "RxSwiftCommunity/RxAlamofire" "4.5.0"
github "SnapKit/SnapKit" "4.2.0"
github "TouchInstinct/LeadKit" "0.9.29"
github "TouchInstinct/TableKit" "2.10008.1"
github "krzyzanowskim/CryptoSwift" "1.3.0"
github "malcommac/SwiftDate" "6.1.0"
github "petropavel13/SwiftValidator" "be856202cd70e6549ebc8c9d07ec47bbff784b07"
github "pronebird/UIScrollView-InfiniteScroll" "1.1.0"
github "kishikawakatsumi/KeychainAccess" "v3.2.0"
github "layoutBox/PinLayout" "1.8.6"

View File

@ -369,7 +369,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\nif which swiftlint >/dev/null; then\nswiftlint autocorrect --path Sources --config ${CONFIG_PATH} && swiftlint --path Sources --config ${CONFIG_PATH}\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = ". run_swiftlint.sh\n";
};
/* End PBXShellScriptBuildPhase section */

View File

@ -105,8 +105,7 @@ public extension BaseTextFieldViewModelEvents {
}
let passedRules = offlineRules
.map { $0.validate(nonEmptyString) }
.reduce(true) { $0 && $1 }
.allSatisfy { $0.validate(nonEmptyString) }
guard passedRules else {
return .just(.initial)

View File

@ -71,7 +71,7 @@ public final class ValidationService {
public func validate() -> Bool {
validationStateReactType = .all
let isValid = validationItems.map { $0.manualValidate() }.reduce(true) { $0 && $1 }
let isValid = validationItems.allSatisfy { $0.manualValidate() }
validationStateReactType = .each
return isValid
@ -95,7 +95,7 @@ public final class ValidationService {
stateObservables.forEach { observable in
observable
.map { states -> Bool in
states.map { $0.isValid }.reduce(true) { $0 && $1 }
states.allSatisfy { $0.isValid }
}
.map { $0 ? ValidationServiceState.valid : .invalid }
.bind(to: stateHolder)

@ -1 +1 @@
Subproject commit 54935bbe26063cdf04e72b8cb76d61c727ff99a7
Subproject commit 1f83bf5d08bbc2c2346141621a42b2d2e0dd6517

14
run_swiftlint.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
readonly CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml
readonly SWIFTLINT_VERSION=0.31.0
readonly SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip
readonly SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME}
. build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} Downloads --remove-cached
cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME}
${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && ${PROJECT_DIR}/Downloads/swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}