Skip to content

Commit

Permalink
chore: .pre-commit config + version increment shell script added
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanildoBarauna committed Jun 11, 2024
1 parent ac7f8ac commit b831fe8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Coverage
name: Tests and Pre-build

on:
pull_request:
Expand Down
14 changes: 11 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks: []
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks: []

# - repo: local
# hooks:
# - id: version-increment
# name: version-increment
# entry: ./version_increment.sh
# language: script
# always_run: true
11 changes: 11 additions & 0 deletions version_increment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

read -p "Increment Patch Version'? (s/N): " response

if [[ "$response" =~ ^([sS][iI][mM]|[sS])$ ]]; then
poetry version patch
git add pyproject.toml
echo "Incremented Version and pyproject.toml added for commit."
else
echo "Version not incremented."
fi

0 comments on commit b831fe8

Please sign in to comment.