Created
April 17, 2025 08:31
-
-
Save jacobsapps/2eb85cff82a8f504fb4d0c4fd55d2667 to your computer and use it in GitHub Desktop.
Size Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| search_dir="$1" # build directory for our bitrise builds | |
| file_name="App Thinning Size Report.txt" | |
| input_file=$(find "$search_dir" -type f -name "$file_name" 2>/dev/null) | |
| uncompressed_sizes=() | |
| while IFS= read -r line; do | |
| if [[ $line == "App size:"* ]]; then | |
| uncompressed_size=$(echo $line | sed -n 's/.* \(.*\) MB uncompressed/\1/p') | |
| uncompressed_sizes+=("$uncompressed_size") | |
| fi | |
| done < "$input_file" | |
| IFS=$'\n' sorted_sizes=($(sort -nr <<<"${uncompressed_sizes[*]}")) | |
| unset IFS | |
| size=${sorted_sizes[0]} | |
| # Check the size and update the comment accordingly | |
| if (( $(echo "$size >= 15.0" | bc -l) )); then | |
| echo "🚨 App clip size is $size MB @ios-devs" | |
| elif (( $(echo "$size >= 14.7" | bc -l) )); then | |
| echo "⚠️ App clip size is $size MB" | |
| else | |
| echo "✅ App clip size is $size MB" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment