-
Notifications
You must be signed in to change notification settings - Fork 120
sort sections #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
sort sections #35
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.