brew install imagemagick brew install ghostscript
# , if [ $CONFIGURATION = "Release" ]; then exit fi # version=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE}"` # build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}"` # , git branch=`git rev-parse --abbrev-ref HEAD` # function processIcon() { export PATH=$PATH:/usr/local/bin base_file=$1 target_icon_name=$2 base_path=`find ${SRCROOT} -name $base_file` if [[ ! -f ${base_path} || -z ${base_path} ]]; then return; fi target_file=`echo $target_icon_name | sed "s/_base//"` target_path="${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${target_file}" width=`identify -format %w ${base_path}` echo $target_path echo $target_file convert -background '#0008' -fill white -gravity center -size ${width}x40 -pointsize 26\ caption:"${version} (${build})"\ "${base_path}" +swap -gravity south -composite "${target_path}" } # processIcon "ewrw_120-1.png" "AppIcon60x60@2x.png" processIcon "ewrw_180.png" "AppIcon60x60@3x.png"
Source: https://habr.com/ru/post/262667/
All Articles