arigram/do

58 lines
812 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2021-11-28 14:56:03 +01:00
set -xe
2021-11-28 14:56:03 +01:00
main() {
SRC="$(dirname "$0")"
cd "$SRC"
2021-11-28 14:56:03 +01:00
ARG=${1:-""}
2021-11-28 14:56:03 +01:00
case $ARG in
2021-11-28 14:56:03 +01:00
review)
gh pr create -f
;;
push)
2021-12-13 18:12:59 +01:00
isort arigram/*.py
black .
2021-12-13 18:12:59 +01:00
python3 -m poetry check
python3 -m poetry lock
$0 check
$0 local
git diff >/tmp/arigram.diff
git add -A
git commit -sa
git push -u origin main
;;
local)
python3 -m poetry install
python3 -m pip install --user --upgrade .
;;
upgrade)
git reset --hard
git pull
$0 local
2021-11-28 14:56:03 +01:00
;;
check)
black .
isort arigram/*.py
chmod a+rx ./check.sh
./check.sh
2021-11-28 14:56:03 +01:00
;;
*)
python3 -m arigram
;;
esac
}
main "$@"