diff --git a/Neon Vision Editor.xcodeproj/project.pbxproj b/Neon Vision Editor.xcodeproj/project.pbxproj index 22e1ef7..168772a 100644 --- a/Neon Vision Editor.xcodeproj/project.pbxproj +++ b/Neon Vision Editor.xcodeproj/project.pbxproj @@ -358,7 +358,7 @@ CODE_SIGNING_ALLOWED = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 251; + CURRENT_PROJECT_VERSION = 252; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = CS727NF72U; ENABLE_APP_SANDBOX = YES; @@ -438,7 +438,7 @@ CODE_SIGNING_ALLOWED = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 251; + CURRENT_PROJECT_VERSION = 252; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = CS727NF72U; ENABLE_APP_SANDBOX = YES; diff --git a/scripts/ci/select_xcode17.sh b/scripts/ci/select_xcode17.sh index bf5726d..890cd60 100755 --- a/scripts/ci/select_xcode17.sh +++ b/scripts/ci/select_xcode17.sh @@ -1,11 +1,31 @@ #!/usr/bin/env bash set -euo pipefail +get_xcode_major() { + local version_output major + if ! version_output="$(xcodebuild -version 2>/dev/null)"; then + return 1 + fi + major="$(printf '%s\n' "$version_output" | awk '/^Xcode / {split($2, v, "."); print v[1]; exit}')" + if [[ -z "$major" || ! "$major" =~ ^[0-9]+$ ]]; then + return 1 + fi + echo "$major" +} + +has_xcode17_or_newer() { + local major + if ! major="$(get_xcode_major)"; then + return 1 + fi + [[ "$major" -ge 17 ]] +} + if [[ -n "${DEVELOPER_DIR:-}" ]]; then - xcodebuild -version + xcodebuild -version || true fi -if xcodebuild -version | awk '/Xcode/ {split($2, v, "."); if (v[1] >= 17) exit 0; exit 1}'; then +if has_xcode17_or_newer; then exit 0 fi @@ -17,7 +37,7 @@ do for path in $candidate; do if [[ -d "$path" ]]; then export DEVELOPER_DIR="$path" - if xcodebuild -version | awk '/Xcode/ {split($2, v, "."); if (v[1] >= 17) exit 0; exit 1}'; then + if has_xcode17_or_newer; then echo "Using DEVELOPER_DIR=$DEVELOPER_DIR" exit 0 fi