Why notNew versions of grep have the option --no-ignore-case which overrides -i:
--no-ignore-case
Do not ignore case distinctions in patterns and input data. This is the default. This option is useful for passing to shell scripts that already use -i, to cancel its effects because the two options override each other.
 For older versions of grep, you could simply add this as option to your script?
Something like:
#!/usr/bin/bash
if [ "$1" = "--no-ignore-case" ]; then
    shift
    grep -rnI --exclude-dir={.git,obj} --exclude=tags --color=auto "$@"
else
    grep -irnI --exclude-dir={.git,obj} --exclude=tags --color=auto "$@"
fi
 Note: --no-ignore-case will need to be  the first argument when you call your script.