Skip to content

Commit c1bc8b3

Browse files
Fix all shellcheck issues (#152)
Follow up of 42c0a4d, fixes or skips all shellcheck issues. Co-authored-by: Stan Ulbrych <[email protected]>
1 parent f1781f2 commit c1bc8b3

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ jobs:
6464
- name: Set version variables
6565
id: version
6666
run: |
67-
echo "all_versions=$(scripts/manage_versions.py all)" >> $GITHUB_OUTPUT
68-
echo "current=$(scripts/manage_versions.py current)" >> $GITHUB_OUTPUT
69-
echo "version_pairs=$(scripts/manage_versions.py generate_pairs)" >> $GITHUB_OUTPUT
67+
{
68+
echo "all_versions=$(scripts/manage_versions.py all)"
69+
echo "current=$(scripts/manage_versions.py current)"
70+
echo "version_pairs=$(scripts/manage_versions.py generate_pairs)"
71+
} >> "$GITHUB_OUTPUT"
7072
7173
- name: Check out branch ${{ steps.version.outputs.current }}
7274
uses: actions/[email protected]
@@ -78,7 +80,7 @@ jobs:
7880
id: languages
7981
working-directory: ${{ steps.version.outputs.current }}
8082
run: |
81-
echo "languages=$(../scripts/list-langs.py)" >> $GITHUB_OUTPUT
83+
echo "languages=$(../scripts/list-langs.py)" >> "$GITHUB_OUTPUT"
8284
8385
- name: Print variables values
8486
run: |
@@ -142,9 +144,9 @@ jobs:
142144
if: ${{ matrix.cpython_version != needs.trigger.outputs.current }}
143145
shell: bash
144146
run: |
145-
ver=$(echo ${{ matrix.cpython_version }} | sed 's|\.||')
146-
echo "TX_PROJECT=python-$ver" >> $GITHUB_ENV
147-
echo ${{ env.TX_PROJECT }}
147+
ver="$(echo "${{ matrix.cpython_version }}" | sed 's|\.||')"
148+
echo "TX_PROJECT=python-$ver" >> "$GITHUB_ENV"
149+
echo "${{ env.TX_PROJECT }}"
148150
149151
# required for generating .tx/config
150152
- name: Generate POT files
@@ -156,7 +158,8 @@ jobs:
156158
157159
- name: Include obsolete catalog templates (pot files) for removal
158160
run: |
159-
deleted_files=$(git status -s | grep ^' D' | cut -d' ' -f3)
161+
deleted_files="$(git status -s | grep ^' D' | cut -d' ' -f3)"
162+
# shellcheck disable=SC2086
160163
if [ -n "$deleted_files" ]; then git rm -v $deleted_files; else echo "no POT files to remove"; fi
161164
162165
- name: Remove problematic source messages from POT files
@@ -211,7 +214,8 @@ jobs:
211214
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
212215
git status
213216
shopt -s globstar
214-
git diff -I'^"POT-Creation-Date: ' --numstat **/*.po **/*.pot | cut -f3 | xargs -r git add -v
217+
git diff -I'^"POT-Creation-Date: ' --numstat ./**/*.po ./**/*.pot | cut -f3 | xargs -r git add -v
218+
# shellcheck disable=SC2046,SC2035
215219
git add -v $(git ls-files -o --exclude-standard *.po *.pot) .tx/config
216220
git diff-index --cached --quiet HEAD || { git commit -vm "Update translations from Transifex"; }
217221

0 commit comments

Comments
 (0)