Skip to content

Instantly share code, notes, and snippets.

@mrtry
Created May 21, 2021 08:53
Show Gist options
  • Save mrtry/5c30b67d0dbb6342550399c61a34219f to your computer and use it in GitHub Desktop.
Save mrtry/5c30b67d0dbb6342550399c61a34219f to your computer and use it in GitHub Desktop.
.xcode-versionと一致してるかをチェックするスクリプト
# Project rootに移動
cd $(git rev-parse --show-toplevel)
if [ "$(cat .xcode-version)" != "$(xcodebuild -version | awk 'NR==1{print $2}')" ]; then
echo 'Invalid Xcode version'
echo ".xcode-version: $(cat .xcode-version)"
echo "xcodebuild version: $(xcodebuild -version | awk 'NR==1{print $2}')"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment