-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: use while read with find * style: use safe cd * feat: add checkSellScripts.sh * fix: use set -euo pipefail * fix: use "set -euo pipefail" * fix: use "set -euo pipefail" * fix: use "set -euo pipefail" * fix: use "set -euo pipefail" * fix: use "set -euo pipefail" * fix: use "set -euo pipefail" * fix: use "set -euo pipefail" * chore: update repository URL in configuration file * fix: update links to point to https://github.com/LibreLingo/LibreLingo instead of https://github.com/kantord/LibreLingo * fix: linking the contributors batch to the contributors section * fix: use "set -euo pipefail" * fix: revert change * fix: use bash * fix: use "set -euo pipefail" * style: avoid using $? * style: avoid using $? * fix: remove redundant command line arguments * fix: use "set -euo pipefail" * fix: add warning * fix: fix spacing * feat: add check_shell_scripts.sh Co-authored-by: Gabor Szabo <gabor@szabgab.com>
- Loading branch information
Showing
18 changed files
with
113 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: check_shell_scripts | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
run_shellcheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install shellcheck | ||
run: | | ||
sudo apt-get install shellcheck | ||
- name: display shellcheck version | ||
run: | | ||
shellcheck --version | ||
- name: run check_shell_scripts | ||
run: | | ||
./scripts/checkShellScripts.sh | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
tail -n +2 ../../docs/image_attributions.csv | while read -r photo_description; do \ | ||
./scripts/fetchPhoto.sh "$photo_description"; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
yarn installCourse "https://github.com/LibreLingo/LibreLingo-ES-from-EN/archive/refs/heads/main.zip" spanish-from-english | ||
yarn installCourse https://codeberg.org/Lamdarer/LibreLingo-DE-from-EN/archive/main.zip german-from-english | ||
yarn installCourse "https://github.com/szabgab/LibreLingo-Judeo-Spanish-from-English/archive/refs/heads/main.zip" ladino-from-english | ||
yarn installCourse "https://github.com/szabgab/LibreLingo-Judeo-Spanish-from-Spanish/archive/refs/heads/main.zip" ladino-from-spanish | ||
yarn installCourse "https://github.com/szabgab/LibreLingo-Judeo-Spanish-from-Hebrew/archive/refs/heads/main.zip" ladino-from-hebrew | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
declare -i exit_code=0 | ||
|
||
if [[ $(basename "$PWD") != "LibreLingo" ]]; then | ||
printf "Start this script from the root directory of the project.\n" | ||
exit 2 | ||
fi | ||
|
||
while IFS="" read -r cur_script | ||
do | ||
printf "Checking \"%s\"\n" "${cur_script}" | ||
if ! shellcheck "$cur_script"; then | ||
exit_code=1 | ||
fi | ||
if ! grep -q "set -euo pipefail" "$cur_script"; then | ||
printf "add \"set -euo pipefail\"\n" | ||
exit_code=1 | ||
fi | ||
done < <(find . -name "*.sh" -not -path "./node_modules/*") | ||
|
||
exit "$exit_code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
yarn exportAllCourses | ||
./scripts/updatePypiReadmeFiles.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
#!/bin/bash | ||
|
||
for directory in $(find apps/ -name pyproject.toml | xargs -n1 dirname); do | ||
echo "Updating README.md for Python package '$(basename "$directory")'..." | ||
cd "$directory" || | ||
{ | ||
echo -en "\r⚠️ Could not enter $directory" | ||
exit 1 | ||
} | ||
poetry install | ||
make README.md -B "$1" | ||
cd - | ||
echo | ||
done | ||
set -euo pipefail | ||
|
||
find apps/ -name pyproject.toml -exec dirname {} \; | | ||
while IFS="" read -r directory | ||
do | ||
echo "Updating README.md for Python package '$(basename "$directory")'..." | ||
cd "$directory" || | ||
{ | ||
echo -en "\r⚠️ Could not enter $directory" | ||
exit 1 | ||
} | ||
poetry install | ||
make README.md -B || | ||
{ | ||
echo -en "\r⚠️ Could not update README.md for Python package '$(basename "$directory")'..." | ||
} | ||
cd - || | ||
{ | ||
echo -en "\r⚠️ Could not return to previous directory" | ||
exit 1 | ||
} | ||
echo | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
yarn exportCourse test | ||
|
||
if git diff --exit-code --name-only; then | ||
|