Skip to content

Commit

Permalink
fixing small details on dev setup script (#73)
Browse files Browse the repository at this point in the history
* now we good bruh

* smol changes to script

* poetry run pytest so no need to activate env

* permissions

* added empty line back to readme
  • Loading branch information
bjornaer authored Apr 12, 2022
1 parent 69ad305 commit cc7dcd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
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}"

0 comments on commit cc7dcd0

Please sign in to comment.