Skip to content

Commit ef8557a

Browse files
chore: remove .increment_version.sh from .pre-commit
1 parent 9be2130 commit ef8557a

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

.github/workflows/CI.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
poetry install
3131
3232
- name: Run tests & CodeCov
33-
run: |
33+
run: |
3434
coverage run -m pytest
3535
coverage report
3636
coverage xml

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ repos:
2323
"--disable=C0114,C0115,C0116, R0903",
2424
]
2525

26-
- repo: local
27-
hooks:
28-
- id: version-inc
29-
name: Version Increase
30-
entry: ./version_increment.sh
31-
language: script
32-
files: .*
26+
# - repo: local
27+
# hooks:
28+
# - id: version-inc
29+
# name: Version Increase
30+
# entry: ./version_increment.sh
31+
# language: script
32+
# files: .*

version_increment.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22

3-
read -p "Increment Version? (s/N): " response
3+
# Use /dev/tty para garantir que a entrada seja lida do terminal
4+
read -r -p "Increment Version? (s/N): " response </dev/tty
45

56
if [[ "$response" =~ ^([sS][iI][mM]|[sS])$ ]]; then
67
echo "Choose an option to increment the version:"
78
echo "1) Major"
89
echo "2) Minor"
910
echo "3) Patch"
10-
echo "4) Pre-release"
11-
read -p "Enter your choice (1/2/3/4): " choice
11+
read -r -p "Enter your choice (1/2/3): " choice </dev/tty
1212

1313
case $choice in
1414
1)
@@ -29,12 +29,6 @@ if [[ "$response" =~ ^([sS][iI][mM]|[sS])$ ]]; then
2929
git commit -m "chore: increase patch version"
3030
echo "Incremented Patch Version and pyproject.toml added for commit."
3131
;;
32-
4)
33-
poetry version prerelease
34-
git add pyproject.toml
35-
git commit -m "chore: increase prerelease version"
36-
echo "Incremented Pre-release Version and pyproject.toml added for commit."
37-
;;
3832
*)
3933
echo "Invalid choice. Version not incremented."
4034
;;

0 commit comments

Comments
 (0)