File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ jobs:
146146 set -eo pipefail
147147 # xcrun simctl delete all
148148 OUTPUT=$(script/create_simulators --platform ${{ env.SCRIPT_PLATFORM }} --version ${{ env.MAJOR }} | tee /dev/stderr)
149- FIRST_UDID=$(printf "%s\n" "$OUTPUT" | awk '/^Created: /{print $NF}' | head -n1)
149+ FIRST_UDID=$(printf "%s\n" "$OUTPUT" | awk '/^( Created:|Already exists:) /{print $NF}' | head -n1)
150150 if [ -n "$FIRST_UDID" ]; then
151151 echo "SIM_UDID=$FIRST_UDID" >> "$GITHUB_ENV"
152152 echo "Captured SIM_UDID=$FIRST_UDID"
Original file line number Diff line number Diff line change 7979
8080# Build a set of existing simulator name+runtime pairs to prevent duplicates across OS versions
8181existing_pairs = Set . new
82+ existing_index = { }
8283begin
8384 devices_json = run ( "xcrun simctl list -j devices" )
8485 if !devices_json . empty?
8889 name = d [ "name" ]
8990 next unless name && runtime_key
9091 existing_pairs . add ( "#{ name } ||#{ runtime_key } " )
92+ existing_index [ "#{ name } ||#{ runtime_key } " ] = d [ "udid" ] if d [ "udid" ]
9193 end
9294 end
9395 end
@@ -169,7 +171,7 @@ local_devices.each do |platform, versions|
169171
170172 pair_key = "#{ sim_name } ||#{ runtime_id } "
171173 if existing_pairs . include? ( pair_key )
172- puts "Already exists: #{ sim_name } (#{ runtime_version } ), skipping "
174+ puts "Already exists: #{ sim_name } (#{ runtime_version } ) -> #{ existing_index [ pair_key ] } "
173175 skipped += 1
174176 next
175177 end
You can’t perform that action at this time.
0 commit comments