Skip to content

Commit b93a696

Browse files
Merge pull request #22 from IvanildoBarauna/feat-VersionControlOnCd
feat VersionControlOnCd
2 parents f220696 + e0d87ae commit b93a696

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.github/workflows/CI.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code Coverage
1+
name: Tests and Pre-build
22

33
on:
44
pull_request:

.pre-commit-config.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.4.0
4-
hooks: []
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.4.0
4+
hooks: []
5+
6+
# - repo: local
7+
# hooks:
8+
# - id: version-increment
9+
# name: version-increment
10+
# entry: ./version_increment.sh
11+
# language: script
12+
# always_run: true

version_increment.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
read -p "Increment Patch Version'? (s/N): " response
4+
5+
if [[ "$response" =~ ^([sS][iI][mM]|[sS])$ ]]; then
6+
poetry version patch
7+
git add pyproject.toml
8+
echo "Incremented Version and pyproject.toml added for commit."
9+
else
10+
echo "Version not incremented."
11+
fi

0 commit comments

Comments
 (0)