Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing small details on dev setup script #73

Merged
merged 7 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
11 changes: 7 additions & 4 deletions setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

G='\033[0;32m'
Y='\033[1;33m'
NC='\033[0m'

echo "${Y}Setting Pre-Push hooks...${NC}"
cat > .git/hooks/pre-push <<- "EOF"
#!/bin/bash
pytest
poetry run pytest
EOF

chmod +x .git/hooks/pre-push
echo "${G}Pre-Push hooks set.${NC}"

echo "${Y}Installing deps...${NC}"
poetry shell
poetry install
echo "${G}Dependencies installed.${NC}"
echo "${Y}Setting Pre-Commit hooks...${NC}"
pre-commit install
poetry run pre-commit install

pre-commit autoupdate
poetry run pre-commit autoupdate
echo "${G}Pre-Commit hooks set.${NC}"