mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
chore(code_layout): use env var and pipe to bypass the "Argument list too long" error
This commit is contained in:
parent
cd741cf67d
commit
565b0b9002
21
.github/workflows/code_layout.yml
vendored
21
.github/workflows/code_layout.yml
vendored
@ -154,25 +154,24 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Requirements
|
||||
run: |
|
||||
sudo apt install -y \
|
||||
expect \
|
||||
silversearcher-ag
|
||||
- uses: tj-actions/changed-files@v42
|
||||
|
||||
- name: Retrieve changed files
|
||||
uses: tj-actions/changed-files@v43
|
||||
id: changed_files
|
||||
with:
|
||||
separator: ' '
|
||||
files_ignore: |
|
||||
**/*.sip.in
|
||||
**/*.png
|
||||
**/*.svg
|
||||
**/*.tif*
|
||||
**/*.gpkg
|
||||
**/*.qgz
|
||||
**/*.qgs
|
||||
separator: " "
|
||||
|
||||
- name: Spell Test
|
||||
run: ./scripts/spell_check/check_spelling.sh -r "${{ steps.changed_files.outputs.all_changed_files }}"
|
||||
if: steps.changed_files.outputs.any_changed == 'true'
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
|
||||
run: echo "$ALL_CHANGED_FILES" | ./scripts/spell_check/check_spelling.sh
|
||||
|
||||
sip_check:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -61,9 +61,21 @@ while getopts ":rdl:" opt; do
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
# check pipe or command line
|
||||
if [ -p /dev/stdin ]; then
|
||||
# with pipe input
|
||||
read SCRIPT_INPUT
|
||||
if [ -z "$SCRIPT_INPUT" ]; then
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
# no pipe input
|
||||
SCRIPT_INPUT="$@"
|
||||
fi
|
||||
|
||||
if [ -n "$SCRIPT_INPUT" ]; then
|
||||
EXCLUDE=$(${GP}sed -e 's/\s*#.*$//' -e '/^\s*$/d' $AGIGNORE | tr '\n' '|' | ${GP}sed -e 's/|$//')
|
||||
INPUTFILES=$(echo "$@" | tr -s '[[:blank:]]' '\n' | ${GP}grep -Eiv "$EXCLUDE" | tr '\n' ' ' )
|
||||
INPUTFILES=$(echo "$SCRIPT_INPUT" | tr -s '[[:blank:]]' '\n' | ${GP}grep -Eiv "$EXCLUDE" | tr '\n' ' ' )
|
||||
if [[ -z $INPUTFILES ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user