さてツールのインストールを続けていきます。
- Homebrew(済)
- swift-format(済)
- SwiftLint(済)
- xcbeautify
- xcode-build-server
xcbeautifyをインストールします。
SweetPadのTOOLSビューからInstall toolをクリックします。
そのままyを押下します。
これも時間かかっても終わらないので強制終了してGithubから直接ソースコードを取ってきてビルドします。
# 1. 最新コードを取得
git clone https://github.com/cpisciotta/xcbeautify.git
cd xcbeautify
# 2. リリースモードでビルドしてパスの通っている場所に配置
swift build -c release
sudo cp .build/release/xcbeautify /usr/local/bin/
# 3. 後始末
cd .. && rm -rf xcbeautify
残念ビルド(swift build -c release)でエラーになりました。取ってきたソースコードが6.1.0用だったようです。
error: 'xcbeautify': package 'xcbeautify' is using Swift tools version 6.1.0 but the installed version is 5.9.0
一旦削除して5.9.0用を取ってきます。
# 1. 一度フォルダを削除してきれいにやり直す
cd ~
rm -rf xcbeautify
# 2. 最初から tag (2.12.0) を指定してクローンする
git clone --branch 2.12.0 --depth 1 https://github.com/cpisciotta/xcbeautify.git
cd xcbeautify
# 3. 再度ビルドして配置
swift build -c release
sudo cp .build/release/xcbeautify /usr/local/bin/
# 4. 後始末
cd .. && rm -rf xcbeautify
xcbeautify --version
2.12.0
問題ないですね。
0 件のコメント:
コメントを投稿