arigram/do

57 lines
861 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
push)
2021-12-13 18:12:59 +01:00
isort arigram/*.py
black arigram/
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 pip install --user --upgrade .
;;
upgrade)
git reset --hard
git pull
$0 local
2021-11-28 14:56:03 +01:00
;;
check)
black arigram/
isort arigram/*.py
chmod u+rx ./check.sh
./check.sh
2021-11-28 14:56:03 +01:00
;;
entry)
mkdir -p /usr/share/applications
cp -i arigram.desktop /usr/share/applications
;;
2021-11-28 14:56:03 +01:00
*)
python3 -m arigram
;;
esac
}
main "$@"