Conversation
|
@SolaWing hi, sorry for the late reply. |
|
not fully tested, but this PR did solve section sorting problem for my case, without any other side effect @truebit |
|
After the first PR, I also fixed some found problem. Maybe we should add auto test? following is our team's precommithook: IFS=$'\n' projs=($(git diff --name-only --cached --diff-filter=ACM | grep -o '[a-zA-Z0-9_./]\+\.xcodeproj/project.pbxproj'))
if ((${#projs[@]} > 0)); then
if command -v python3 >/dev/null 2>&1; then
py='python3'
else
py='python'
fi
# set -x
for proj in ${projs[@]}; do
$py xUnique.py -c "$proj";
ret=$?
if (($ret == 100)); then
git add "$proj"
elif (($ret > 0)); then
echo 'xcodeproj file may broken! check the exception message please'
echo 'you may add `--no-verify` option for commit to skip checking xcodeproj'
exit 1
fi
done
if [[ ! $(git diff --name-only --cached | grep -o '[a-zA-Z0-9_./]\+\.xcodeproj/project.pbxproj') ]]; then
echo 'no changes, commit abort'
exit 1
fi
fi |
|
@SolaWing Thanks for the input. |
as #17, I rewrote sort to support sorting sections. This will ease the pain of Xcode reordering sections and causing huge modifications.