mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2025-03-16 19:00:12 +00:00
remove old deploy function
This commit is contained in:
parent
01f2b42d33
commit
edaf1cdd7d
32
deploy.sh
32
deploy.sh
@ -82,34 +82,6 @@ function sync_test {
|
||||
}
|
||||
|
||||
|
||||
# run same tests and checks as with github action but locally
|
||||
# takes filename to validate as optional argument
|
||||
function validate {
|
||||
|
||||
if [[ $1 ]]; then
|
||||
check_path="$1"
|
||||
else
|
||||
check_path="."
|
||||
fi
|
||||
|
||||
echo "run validate on $check_path"
|
||||
|
||||
# note: this logic is duplicated in the `./github/workflows/lint_python.yml` config
|
||||
# if you update this file, you should update that as well
|
||||
echo "running black"
|
||||
black --force-exclude "migrations/*" --diff --color --check -l 79 "$check_path"
|
||||
echo "running codespell"
|
||||
codespell --skip="./.git,./.venv,./package.json,./package-lock.json,**/node_modules,./.mypy_cache,**/static/volume" "$check_path"
|
||||
echo "running flake8"
|
||||
flake8 "$check_path" --exclude "migrations,.venv,frontend" --count --max-complexity=10 \
|
||||
--max-line-length=79 --show-source --statistics
|
||||
echo "running isort"
|
||||
isort --skip "migrations" --skip ".venv" --skip "frontend" --check-only --diff --profile black -l 79 "$check_path"
|
||||
printf " \n> all validations passed\n"
|
||||
|
||||
}
|
||||
|
||||
|
||||
# update latest tag compatible es for set and forget
|
||||
function sync_latest_es {
|
||||
|
||||
@ -224,8 +196,6 @@ if [[ $1 == "blackhole" ]]; then
|
||||
sync_blackhole
|
||||
elif [[ $1 == "test" ]]; then
|
||||
sync_test "$2"
|
||||
elif [[ $1 == "validate" ]]; then
|
||||
validate "$2"
|
||||
elif [[ $1 == "docker" ]]; then
|
||||
sync_docker
|
||||
elif [[ $1 == "unstable" ]]; then
|
||||
@ -233,7 +203,7 @@ elif [[ $1 == "unstable" ]]; then
|
||||
elif [[ $1 == "es" ]]; then
|
||||
sync_latest_es
|
||||
else
|
||||
echo "valid options are: blackhole | test | validate | docker | unstable | es"
|
||||
echo "valid options are: blackhole | test | docker | unstable | es"
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user