chore: fix shell scripts lint errors
This commit is contained in:
parent
5c919989ea
commit
d47fef0806
23 changed files with 359 additions and 228 deletions
|
|
@ -1,24 +1,29 @@
|
|||
#!/bin/bash -eux
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
# We clean up translations, only fully translated components are kept
|
||||
IFS=$'\n'
|
||||
|
||||
for i in $(poetry run sphinx-intl stat); do
|
||||
echo "$i"
|
||||
if [[ "$i" != *" 0 untranslated." ]]; then
|
||||
file=$(echo $i | cut -d: -f1)
|
||||
echo "delete $file"
|
||||
rm $file
|
||||
fi
|
||||
echo "$i"
|
||||
if [[ "$i" != *" 0 untranslated." ]]; then
|
||||
file=$(echo "$i" | cut -d: -f1)
|
||||
echo "delete $file"
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Build sphinx
|
||||
poetry run sphinx-multiversion . $BUILD_PATH
|
||||
for d in $(ls locales); do
|
||||
if [[ $d != "gettext" ]]; then
|
||||
poetry run sphinx-multiversion -D language="$d" . $BUILD_PATH/$d
|
||||
fi
|
||||
poetry run sphinx-multiversion . "$BUILD_PATH"
|
||||
for path in locales/*; do
|
||||
lang="$(basename "$path")"
|
||||
if [[ "$lang" != "gettext" ]]; then
|
||||
poetry run sphinx-multiversion -D language="$lang" . "$BUILD_PATH/$lang"
|
||||
fi
|
||||
done
|
||||
|
||||
# Build swagger
|
||||
TARGET_PATH="$BUILD_PATH/swagger" ./build_swagger.sh
|
||||
python ./get-releases-json.py > $BUILD_PATH/releases.json
|
||||
python ./get-releases-json.py --latest > $BUILD_PATH/latest.txt
|
||||
python3 ./get-releases-json.py > "$BUILD_PATH/releases.json"
|
||||
python3 ./get-releases-json.py --latest > "$BUILD_PATH/latest.txt"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
#!/bin/bash -eux
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
SWAGGER_VERSION="4.1.3"
|
||||
TARGET_PATH=${TARGET_PATH-"swagger"}
|
||||
rm -rf $TARGET_PATH /tmp/swagger-ui
|
||||
|
||||
rm -rf "$TARGET_PATH" /tmp/swagger-ui
|
||||
git clone --branch="v$SWAGGER_VERSION" --depth=1 "https://github.com/swagger-api/swagger-ui.git" /tmp/swagger-ui
|
||||
mv /tmp/swagger-ui/dist $TARGET_PATH
|
||||
cp schema.yml $TARGET_PATH
|
||||
cp -r api $TARGET_PATH/api
|
||||
sed -i "s,https://petstore.swagger.io/v2/swagger.json,schema.yml,g" $TARGET_PATH/index.html
|
||||
|
||||
mv /tmp/swagger-ui/dist "$TARGET_PATH"
|
||||
cp schema.yml "$TARGET_PATH"
|
||||
cp -r api "$TARGET_PATH/api"
|
||||
sed -i "s,https://petstore.swagger.io/v2/swagger.json,schema.yml,g" "$TARGET_PATH/index.html"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
poetry run make -e BUILDDIR=locales gettext
|
||||
for f in $(ls locales | grep -v gettext); do
|
||||
poetry run sphinx-intl update -p locales/gettext -l $f
|
||||
done;
|
||||
|
||||
for path in locales/*; do
|
||||
lang="$(basename "$path")"
|
||||
if [[ "$lang" != "gettext" ]]; then
|
||||
poetry run sphinx-intl update -p locales/gettext -l "$lang"
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue