carthage SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.エラー

タイトルのエラーの原因と解決策のメモ
今回は「Smile-Lock」というパスコードの入力画面を簡単に実装できるライブラリを使おうとして発生。プロジェクトの都合でxcodeのバージョンは10.1でSwift4.2を使用。

Cartfile

github "recruit-lifestyle/Smile-Lock"

carthage update

$ carthage update Smile-Lock --platform iOS
*** Checking out Smile-Lock at "3.0.8"
*** xcodebuild output can be found in /var/folders/f8/3j706yps6t97pj4d6b49f5200000gn/T/carthage-xcodebuild.4fxFE3.log
*** Building scheme "SmileLock" in SmileLock-Example.xcworkspace
Build Failed
        Task failed with exit code 65:
(省略)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/f8/3j706yps6t97pj4d6b49f5200000gn/T/carthage-xcodebuild.4fxFE3.log

エラーメッセージのログを見てみる

$ cat /var/folders/f8/3j706yps6t97pj4d6b49f5200000gn/T/carthage-xcodebuild.4fxFE3.log

(省略)

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SmileLock')

Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SmileLock')

** ARCHIVE FAILED **

Swift5なんて使ってないのにと思ってたら勘違いだった。
Carthage/Checkouts/Smile-Lock/SmileLock-Example/SmileLock-Example.xcworkspace の 「Swift Language Version」がSwift5.0が指定されてた

Cartfile

github "recruit-lifestyle/Smile-Lock" "3.0.7"

Swift5対応される前のバージョンを指定してcarthage updateしたらうまくいった。
けどXcodeとSwiftのバージョンそろそろあげないとな...以上です