Skip to content

Commit

Permalink
Add get xcode version script
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Sep 6, 2022
1 parent 2d0ec05 commit efa8a8d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/get-xcode-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

# Matches the version number from the output of xcodebuild -version
# Example: 13.4.1
xcodeBin=/usr/bin/xcodebuild

xcodeVersionOutput=$($xcodeBin -version)
xcodeVersion=$(echo "$xcodeVersionOutput" | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')

echo "$xcodeVersion"

0 comments on commit efa8a8d

Please sign in to comment.