[Swift] CarthageでTask failed with exit code 65エラー

`carthage bootstrap` した際に `Task failed with exit code 65` エラーで少しハマったので共有。

# 問題発生編
```
$ cd PATH/TO/PROJECT/
$ carthage bootstrap RxSwiftExt --platform macOS --no-use-binaries
```

```
*** Checking out RxSwiftExt at "3.4.0"
*** xcodebuild output can be found in /var/folders/v5/XXxxXxxxXXxXXxxXxxxxxxXxxxx_xx/T/carthage-xcodebuild.xXXxXX.log
*** No cache found for RxSwiftExt, building with all downstream dependencies
*** Building scheme "RxSwiftExt-macOS" in RxSwiftExt.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace /Users/USERNAME/PATH/TO/PROJECT/Carthage/Checkouts/RxSwiftExt/RxSwiftExt.xcworkspace -scheme RxSwiftExt-macOS -configuration Release -derivedDataPath /Users/USERNAME/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/RxSwiftExt/3.4.0 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/v5/XXxxXxxxXXxXXxxXxxxxxxXxxxx_xx/T/RxSwiftExt SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/USERNAME/PATH/TO/PROJECT/Carthage/Checkouts/RxSwiftExt)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/v5/XXxxXxxxXXxXXxxXxxxxxxXxxxx_xx/T/carthage-xcodebuild.xXXxXX.log
```

よくあるキャッシュ問題かな？と以下のディレクトリを削除した。
しかし、結果は同じく **エラー** 。

* `~/Library/Cache/carthage` 
* `~/Library/Cache/org.carthage.CarthageKit` 
* プロジェクト以下の `Carthage` 

# 調査編
冷静にログ内容を見てみた。

```
$ open /var/folders/v5/XXxxXxxxXXxXXxxXxxxxxxXxxxx_xx/T/carthage-xcodebuild.xXXxXX.log
```

```
Touch /Users/USERNAME/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/RxSwiftExt/3.4.0/Build/Intermediates.noindex/ArchiveIntermediates/RxSwiftExt-macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/RxSwiftExt.framework (in target: RxSwiftExt-macOS)
    cd /Users/USERNAME/PATH/TO/PROJECT/Carthage/Checkouts/RxSwiftExt
    /usr/bin/touch -c /Users/USERNAME/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/RxSwiftExt/3.4.0/Build/Intermediates.noindex/ArchiveIntermediates/RxSwiftExt-macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/RxSwiftExt.framework

** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution Swiftlint /Users/USERNAME/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/RxSwiftExt/3.4.0/Build/Intermediates.noindex/ArchiveIntermediates/RxSwiftExt-macOS/IntermediateBuildFilesPath/RxSwiftExt.build/Release/RxSwiftExt-macOS.build/Script-87B3D2C2203EB02B001327A4.sh
(1 failure)
```
失敗しているshellを実行してみる。

```
$ sh /Users/USERNAME/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/RxSwiftExt/3.4.0/Build/Intermediates.noindex/ArchiveIntermediates/RxSwiftExt-macOS/IntermediateBuildFilesPath/RxSwiftExt.build/Release/RxSwiftExt-macOS.build/Script-87B3D2C2203EB02B001327A4.sh
```

```
fatal error: Unexpected Swift version: file /tmp/swiftlint-20170407-45056-wip7rd/Source/SwiftLintFramework/Models/SwiftVersion.swift, line 38
```
？？？
ファイルを見てみる。

```
$ open /tmp/swiftlint-20170407-45056-wip7rd/Source/SwiftLintFramework/Models/SwiftVersion.swift
The file /tmp/swiftlint-20170407-45056-wip7rd/Source/SwiftLintFramework/Models/SwiftVersion.swift does not exist.
```
が、既に無し。
これか。
https://github.com/realm/SwiftLint/blob/master/Source/SwiftLintFramework/Models/SwiftVersion.swift

:bulb:

```
$ swiftlint version
0.18.1
```
これか！

# 解決編
swiftlintのバージョン上げたら無事解決した。

```
$ brew upgrade swiftlint
```

```
$ swiftlint version
0.29.1
```

```
$ carthage bootstrap RxSwiftExt --platform macOS --no-use-binaries
*** Checking out RxSwiftExt at "3.4.0"
*** xcodebuild output can be found in /var/folders/v5/XXxxXxxxXXxXXxxXxxxxxxXxxxx_xx/T/carthage-xcodebuild.xXXxXX.log
*** No cache found for RxSwiftExt, building with all downstream dependencies
*** Building scheme "RxSwiftExt-macOS" in RxSwiftExt.xcworkspace
```

RxSwiftや他のライブラリでも始めエラーになってたけどキャッシュクリアしたら（偶然？）解消したので、RxSwiftExtだけまさかの原因違いだったので少しハマった。