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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Requirements
|
- name: Install Requirements
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
expect \
|
expect \
|
||||||
silversearcher-ag
|
silversearcher-ag
|
||||||
- uses: tj-actions/changed-files@v42
|
|
||||||
|
- name: Retrieve changed files
|
||||||
|
uses: tj-actions/changed-files@v43
|
||||||
id: changed_files
|
id: changed_files
|
||||||
with:
|
with:
|
||||||
separator: ' '
|
separator: " "
|
||||||
files_ignore: |
|
|
||||||
**/*.sip.in
|
|
||||||
**/*.png
|
|
||||||
**/*.svg
|
|
||||||
**/*.tif*
|
|
||||||
**/*.gpkg
|
|
||||||
**/*.qgz
|
|
||||||
**/*.qgs
|
|
||||||
- name: Spell Test
|
- 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:
|
sip_check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -61,9 +61,21 @@ while getopts ":rdl:" opt; do
|
|||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
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/|$//')
|
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
|
if [[ -z $INPUTFILES ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user