pre-commit-crocodile 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.cz.yaml +17 -17
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.gitlab-ci.yml +27 -2
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/CHANGELOG.md +39 -0
- {pre_commit_crocodile-2.0.0/pre_commit_crocodile.egg-info → pre_commit_crocodile-2.0.2}/PKG-INFO +11 -28
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/README.md +10 -27
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/commitizen.md +9 -1
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/commits.md +1 -1
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/components.md +2 -4
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/hooks.md +2 -4
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/pre-commit.md +9 -1
- pre_commit_crocodile-2.0.2/docs/prepare.sh +68 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/preview.py +15 -0
- pre_commit_crocodile-2.0.2/docs/preview.svg +420 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/settings.md +1 -1
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2/pre_commit_crocodile.egg-info}/PKG-INFO +11 -28
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/assets/.cz.yaml +17 -17
- pre_commit_crocodile-2.0.0/docs/prepare.sh +0 -85
- pre_commit_crocodile-2.0.0/docs/preview.svg +0 -414
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.coveragerc +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.gitattributes +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.gitignore +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.markdownlint.json +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.pre-commit-config.yaml +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.pre-commit-hooks.yaml +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.style.yapf +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.vscode/extensions.json +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/.vscode/settings.json +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/LICENSE +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/config/cliff.toml +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/codestyle/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/commits/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/deploy/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/pages/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/preview/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/test-coverage-linux/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/test-coverage-windows/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/containers/test-linux/Dockerfile +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/docs/template.svg +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/mkdocs.yml +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/mypy.ini +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/pre_commit_crocodile.egg-info/SOURCES.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/pre_commit_crocodile.egg-info/dependency_links.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/pre_commit_crocodile.egg-info/entry_points.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/pre_commit_crocodile.egg-info/requires.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/pre_commit_crocodile.egg-info/top_level.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/build.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/commits.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/coverage.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/deploy.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/docs.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/pages.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/quality.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/runtime.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/requirements/tests.txt +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/setup.cfg +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/setup.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/sonar-project.properties +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/__main__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/assets/.pre-commit-config.yaml +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/assets/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/cli/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/cli/entrypoint.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/cli/main.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/hooks/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/hooks/configurations.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/hooks/prepare_commit_message.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/package/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/package/bundle.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/package/settings.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/package/updates.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/package/version.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/prints/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/prints/boxes.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/prints/colors.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/system/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/system/commands.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/system/platform.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/types/__init__.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/types/environments.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/src/types/strings.py +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/templates/commits.yml +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/tests/arguments/test.sh +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/tests/colors/test.sh +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/tests/macos/test.sh +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/tests/settings/test.sh +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/tests/versions/test.sh +0 -0
- {pre_commit_crocodile-2.0.0 → pre_commit_crocodile-2.0.2}/tests/windows/test.sh +0 -0
|
@@ -36,36 +36,36 @@ commitizen:
|
|
|
36
36
|
|
|
37
37
|
## Conventional Commits - Customized specification
|
|
38
38
|
|
|
39
|
-
The commit contains the following structural elements
|
|
40
|
-
intent to the consumers of your library:
|
|
39
|
+
The commit contains the following structural elements:
|
|
41
40
|
|
|
42
41
|
### Commit type
|
|
43
42
|
|
|
44
|
-
fix:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
- fix: Bug or issues fixes
|
|
44
|
+
- feat: New or extended feature
|
|
45
|
+
- chore: Changes to non-production code
|
|
46
|
+
- docs: Documentation only changes
|
|
47
|
+
- style: Cosmetic changes only (white-space, formatting, etc)
|
|
48
|
+
- refactor: Code changes that neither fix a bug nor add a feature
|
|
49
|
+
- perf: Code change that improve performance
|
|
50
|
+
- security: Changes resolve security related issues
|
|
51
|
+
- test: Adding missing or correcting existing tests
|
|
52
|
+
- build: Changes to the build system or dependencies (example: makefile, pip, docker)
|
|
53
|
+
- ci: Changes to CI configuration files and scripts (example: gitlab-ci)
|
|
54
|
+
- improvement: Changes that improve sources without any impact
|
|
55
|
+
- wip: Temporary commits meant for local developments and rebases
|
|
57
56
|
|
|
58
57
|
### Commit scope
|
|
59
58
|
|
|
60
59
|
A scope has to be provided to a commit’s type, to provide additional contextual information,
|
|
61
60
|
such as the changed file, the containing folder or a globally modified feature,
|
|
62
|
-
and is contained within parenthesis, e.g
|
|
61
|
+
and is contained within parenthesis, e.g. feat(parser): add ability to parse arrays.
|
|
63
62
|
|
|
64
63
|
### Commit breaking changes
|
|
65
64
|
|
|
66
65
|
BREAKING CHANGE: A commit with '!' before the ':' or that has the text BREAKING CHANGE:
|
|
67
66
|
at the beginning of its optional body or footer section introduces a breaking API change
|
|
68
67
|
(correlating with MAJOR in semantic versioning).
|
|
68
|
+
|
|
69
69
|
A BREAKING CHANGE can be part of commits of any type.
|
|
70
70
|
|
|
71
71
|
### Commit syntax
|
|
@@ -122,7 +122,7 @@ commitizen:
|
|
|
122
122
|
name: 'test: Adding missing or correcting existing tests'
|
|
123
123
|
key: t
|
|
124
124
|
- value: build
|
|
125
|
-
name: 'build: Changes to the build system or dependencies
|
|
125
|
+
name: 'build: Changes to the build system or dependencies (example: makefile, pip, docker)'
|
|
126
126
|
key: b
|
|
127
127
|
- value: ci
|
|
128
128
|
name: 'ci: Changes to CI configuration files and scripts (example: gitlab-ci)'
|
|
@@ -70,6 +70,29 @@ changelog:
|
|
|
70
70
|
rules:
|
|
71
71
|
- if: $CI_LOCAL
|
|
72
72
|
|
|
73
|
+
hooks:
|
|
74
|
+
stage: development
|
|
75
|
+
image: local:silent
|
|
76
|
+
script:
|
|
77
|
+
# Refresh configurations
|
|
78
|
+
- pre-commit-crocodile --configure
|
|
79
|
+
# Stash local changes
|
|
80
|
+
- echo ''
|
|
81
|
+
- echo ' [INFO] Use "s" to split hunks and "y" to remove changes you do not want, "n" otherwise'
|
|
82
|
+
- echo ''
|
|
83
|
+
- sleep 2
|
|
84
|
+
- git stash -p
|
|
85
|
+
# Stage changes
|
|
86
|
+
- git add -v ./.cz.yaml ./.pre-commit-config.yaml
|
|
87
|
+
# Enable hooks
|
|
88
|
+
- pre-commit-crocodile --enable
|
|
89
|
+
# Run hooks
|
|
90
|
+
- pre-commit-crocodile --run
|
|
91
|
+
# Reset changes
|
|
92
|
+
- git reset HEAD ./.cz.yaml ./.pre-commit-config.yaml
|
|
93
|
+
rules:
|
|
94
|
+
- if: $CI_LOCAL
|
|
95
|
+
|
|
73
96
|
images:
|
|
74
97
|
stage: development
|
|
75
98
|
image: local:silent
|
|
@@ -156,7 +179,7 @@ preview:
|
|
|
156
179
|
- project="${PWD}"
|
|
157
180
|
- remote=$(git config --get remote.origin.url | sed 's#git@gitlab.com:#https://gitlab.com/#g')
|
|
158
181
|
# Prepare package revision
|
|
159
|
-
- export DEBUG_REVISION_SHA=$(git rev-parse --short
|
|
182
|
+
- export DEBUG_REVISION_SHA=$(git rev-parse --short origin/develop)
|
|
160
183
|
# Create temporary sources
|
|
161
184
|
- |
|
|
162
185
|
sources=$(mktemp -d)
|
|
@@ -222,7 +245,8 @@ serve:
|
|
|
222
245
|
script:
|
|
223
246
|
# Prepare documentation
|
|
224
247
|
- |
|
|
225
|
-
|
|
248
|
+
mkdir -p ./docs/.cache/
|
|
249
|
+
ls -1 ./.cz.yaml ./docs/* ./mkdocs.yml ./README.md | entr sh ./docs/prepare.sh &
|
|
226
250
|
echo -n "${!}" >./docs/.cache/.serve.pid
|
|
227
251
|
sleep 2
|
|
228
252
|
# Generate documentation
|
|
@@ -667,6 +691,7 @@ pages:
|
|
|
667
691
|
- sh ./docs/prepare.sh
|
|
668
692
|
# Generate documentation
|
|
669
693
|
- mkdocs build --clean --config-file ./mkdocs.yml --verbose
|
|
694
|
+
after_script:
|
|
670
695
|
# Cleanup documentation
|
|
671
696
|
- rm -rf ./docs/.cache
|
|
672
697
|
artifacts:
|
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
<a name="2.0.2"></a>
|
|
4
|
+
## [2.0.2](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/compare/2.0.1...2.0.2) (2024-08-22)
|
|
5
|
+
|
|
6
|
+
### 📚 Documentation
|
|
7
|
+
|
|
8
|
+
- **components, hooks:** add file name headers for sources changes ([77cfb9b](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/77cfb9b4dc249e70811afc1161d4fefd170877e4))
|
|
9
|
+
- **prepare:** bind 'preview.svg' image as a webpage asset ([2e214bd](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/2e214bdb63459c4265b035a6d86fe2e0ef69c1ef))
|
|
10
|
+
- **preview:** add 'clear' calls before 'git add' sections ([8dd763c](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/8dd763c308e2319ea48c771fcb0abebdaa58f591))
|
|
11
|
+
- **preview:** fix SVG preview for version 2.0.1 ([1d34359](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/1d34359768b881efd1a6ee3a0ec9a17f9fac17be))
|
|
12
|
+
- **readme:** remove '{ ... }' wrappers for single commands ([dd892d8](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/dd892d8233f304b4b24cf3475f6c24f2a1e1ce5d))
|
|
13
|
+
- **readme:** simplify and cleanup commands documentation ([d2d3b38](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/d2d3b38a87780524bcd56a41ca52b8276f633553))
|
|
14
|
+
|
|
15
|
+
### 🚀 CI
|
|
16
|
+
|
|
17
|
+
- **gitlab-ci:** create 'hooks' local job for maintenance ([df35dc9](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/df35dc992f811dbd35981d59643c7d20b51d20c0))
|
|
18
|
+
- **gitlab-ci:** prepare and remove '.cache' even upon failures ([f56f38e](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/f56f38e29e33877871ce1cc538e569374e1fa349))
|
|
19
|
+
- **gitlab-ci:** use 'origin/develop' as hooks revision for 'preview' ([9c0c29c](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/9c0c29c353297c8ec21329ea3dfec3b1187c708a))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<a name="2.0.1"></a>
|
|
23
|
+
## [2.0.1](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/compare/2.0.0...2.0.1) (2024-08-21)
|
|
24
|
+
|
|
25
|
+
### ✨ Features
|
|
26
|
+
|
|
27
|
+
- **commitizen:** refactor commits documentation and improve markdown ([10d1da9](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/10d1da9cf8e6a957a63ab820b4aa36235130db37))
|
|
28
|
+
|
|
29
|
+
### 📚 Documentation
|
|
30
|
+
|
|
31
|
+
- **docs:** add 'commitizen' to the project main description ([effba2f](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/effba2fa32ad96e3373332fc143240eab36308c6))
|
|
32
|
+
- **docs:** embed files directly using 'mkdocs' syntax '--8<-- "..."' ([a51755e](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/a51755e1db63ea04d23d2f77af53f053687707fa))
|
|
33
|
+
- **docs:** improve headers with links for configurations files ([565c92f](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/565c92f6151201c3bde104619f8c9f36442092ad))
|
|
34
|
+
- **preview:** refresh SVG preview for version 2.0.1 ([50621dc](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/50621dc1eb74c6382d9865f02e4819f83b6a3b26))
|
|
35
|
+
- **readme:** add 'Package' link in the 'README' documentation ([6238b85](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/6238b85d63fac17cd658c89c7af92def065f6a43))
|
|
36
|
+
|
|
37
|
+
### 🚀 CI
|
|
38
|
+
|
|
39
|
+
- **gitlab-ci:** watch for '.cz.yaml' in 'serve' job ([e1f8319](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/e1f8319c6cb4b5530f9bd24bc08f4bf4e54216d6))
|
|
40
|
+
|
|
41
|
+
|
|
3
42
|
<a name="2.0.0"></a>
|
|
4
43
|
## [2.0.0](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/compare/1.1.0...2.0.0) (2024-08-21)
|
|
5
44
|
|
{pre_commit_crocodile-2.0.0/pre_commit_crocodile.egg-info → pre_commit_crocodile-2.0.2}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pre-commit-crocodile
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Git hooks intended for developers using pre-commit
|
|
5
5
|
Home-page: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile
|
|
6
6
|
Author: Adrian DC
|
|
@@ -44,9 +44,10 @@ Requires-Dist: update_checker>=0.18.0
|
|
|
44
44
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
45
45
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
46
46
|
|
|
47
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
47
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
48
48
|
|
|
49
|
-
**Documentation:** <https://radiandevcore.gitlab.io/tools/pre-commit-crocodile>
|
|
49
|
+
**Documentation:** <https://radiandevcore.gitlab.io/tools/pre-commit-crocodile>
|
|
50
|
+
**Package:** <https://pypi.org/project/pre-commit-crocodile/>
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -63,7 +64,7 @@ Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
|
63
64
|
|
|
64
65
|
## Preview
|
|
65
66
|
|
|
66
|
-

|
|
67
68
|
|
|
68
69
|
---
|
|
69
70
|
|
|
@@ -130,10 +131,7 @@ positional arguments:
|
|
|
130
131
|
### Import configurations
|
|
131
132
|
|
|
132
133
|
```bash
|
|
133
|
-
|
|
134
|
-
# Disable hooks
|
|
135
|
-
pre-commit-crocodile --configure
|
|
136
|
-
}
|
|
134
|
+
pre-commit-crocodile --configure
|
|
137
135
|
```
|
|
138
136
|
|
|
139
137
|
---
|
|
@@ -143,46 +141,31 @@ positional arguments:
|
|
|
143
141
|
### Install dependencies
|
|
144
142
|
|
|
145
143
|
```bash
|
|
146
|
-
|
|
147
|
-
# Install dependencies
|
|
148
|
-
pre-commit-crocodile --install
|
|
149
|
-
}
|
|
144
|
+
pre-commit-crocodile --install
|
|
150
145
|
```
|
|
151
146
|
|
|
152
147
|
### Enable hooks
|
|
153
148
|
|
|
154
149
|
```bash
|
|
155
|
-
|
|
156
|
-
# Enable hooks
|
|
157
|
-
pre-commit-crocodile --enable
|
|
158
|
-
}
|
|
150
|
+
pre-commit-crocodile --enable
|
|
159
151
|
```
|
|
160
152
|
|
|
161
153
|
### Run hooks
|
|
162
154
|
|
|
163
155
|
```bash
|
|
164
|
-
|
|
165
|
-
# Manually run hooks
|
|
166
|
-
pre-commit-crocodile --run
|
|
167
|
-
}
|
|
156
|
+
pre-commit-crocodile --run
|
|
168
157
|
```
|
|
169
158
|
|
|
170
159
|
### Update hooks
|
|
171
160
|
|
|
172
161
|
```bash
|
|
173
|
-
|
|
174
|
-
# Autoupdate hooks
|
|
175
|
-
pre-commit-crocodile --autoupdate
|
|
176
|
-
}
|
|
162
|
+
pre-commit-crocodile --autoupdate
|
|
177
163
|
```
|
|
178
164
|
|
|
179
165
|
### Disable hooks
|
|
180
166
|
|
|
181
167
|
```bash
|
|
182
|
-
|
|
183
|
-
# Disable hooks
|
|
184
|
-
pre-commit-crocodile --disable
|
|
185
|
-
}
|
|
168
|
+
pre-commit-crocodile --disable
|
|
186
169
|
```
|
|
187
170
|
|
|
188
171
|
---
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
13
13
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
14
14
|
|
|
15
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
15
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
16
16
|
|
|
17
|
-
**Documentation:** <https://radiandevcore.gitlab.io/tools/pre-commit-crocodile>
|
|
17
|
+
**Documentation:** <https://radiandevcore.gitlab.io/tools/pre-commit-crocodile>
|
|
18
|
+
**Package:** <https://pypi.org/project/pre-commit-crocodile/>
|
|
18
19
|
|
|
19
20
|
---
|
|
20
21
|
|
|
@@ -31,7 +32,7 @@ Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
|
31
32
|
|
|
32
33
|
## Preview
|
|
33
34
|
|
|
34
|
-

|
|
35
36
|
|
|
36
37
|
---
|
|
37
38
|
|
|
@@ -98,10 +99,7 @@ positional arguments:
|
|
|
98
99
|
### Import configurations
|
|
99
100
|
|
|
100
101
|
```bash
|
|
101
|
-
|
|
102
|
-
# Disable hooks
|
|
103
|
-
pre-commit-crocodile --configure
|
|
104
|
-
}
|
|
102
|
+
pre-commit-crocodile --configure
|
|
105
103
|
```
|
|
106
104
|
|
|
107
105
|
---
|
|
@@ -111,46 +109,31 @@ positional arguments:
|
|
|
111
109
|
### Install dependencies
|
|
112
110
|
|
|
113
111
|
```bash
|
|
114
|
-
|
|
115
|
-
# Install dependencies
|
|
116
|
-
pre-commit-crocodile --install
|
|
117
|
-
}
|
|
112
|
+
pre-commit-crocodile --install
|
|
118
113
|
```
|
|
119
114
|
|
|
120
115
|
### Enable hooks
|
|
121
116
|
|
|
122
117
|
```bash
|
|
123
|
-
|
|
124
|
-
# Enable hooks
|
|
125
|
-
pre-commit-crocodile --enable
|
|
126
|
-
}
|
|
118
|
+
pre-commit-crocodile --enable
|
|
127
119
|
```
|
|
128
120
|
|
|
129
121
|
### Run hooks
|
|
130
122
|
|
|
131
123
|
```bash
|
|
132
|
-
|
|
133
|
-
# Manually run hooks
|
|
134
|
-
pre-commit-crocodile --run
|
|
135
|
-
}
|
|
124
|
+
pre-commit-crocodile --run
|
|
136
125
|
```
|
|
137
126
|
|
|
138
127
|
### Update hooks
|
|
139
128
|
|
|
140
129
|
```bash
|
|
141
|
-
|
|
142
|
-
# Autoupdate hooks
|
|
143
|
-
pre-commit-crocodile --autoupdate
|
|
144
|
-
}
|
|
130
|
+
pre-commit-crocodile --autoupdate
|
|
145
131
|
```
|
|
146
132
|
|
|
147
133
|
### Disable hooks
|
|
148
134
|
|
|
149
135
|
```bash
|
|
150
|
-
|
|
151
|
-
# Disable hooks
|
|
152
|
-
pre-commit-crocodile --disable
|
|
153
|
-
}
|
|
136
|
+
pre-commit-crocodile --disable
|
|
154
137
|
```
|
|
155
138
|
|
|
156
139
|
---
|
|
@@ -12,4 +12,12 @@
|
|
|
12
12
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
13
13
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
14
14
|
|
|
15
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
15
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Configurations for [commitizen](https://commitizen-tools.github.io/commitizen/)
|
|
20
|
+
|
|
21
|
+
```yaml title="Sources / .cz.yaml"
|
|
22
|
+
--8<-- ".cz.yaml"
|
|
23
|
+
```
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
13
13
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
14
14
|
|
|
15
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
15
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
13
13
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
14
14
|
|
|
15
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
15
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -25,9 +25,7 @@ Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
|
25
25
|
- **Run pre-commit checks** on all files
|
|
26
26
|
- **Deny `WIP` commits** on GitLab branches
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```yaml
|
|
28
|
+
```yaml title="Sources / .gitlab-ci.yml"
|
|
31
29
|
include:
|
|
32
30
|
- component: gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits@X.Y.Z # Adapt to latest release tag
|
|
33
31
|
inputs:
|
|
@@ -12,15 +12,13 @@
|
|
|
12
12
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
13
13
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
14
14
|
|
|
15
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
15
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
## Using pre-commit-crocodile hooks
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```yaml
|
|
21
|
+
```yaml title="Sources / .pre-commit-config.yaml"
|
|
24
22
|
# pre-commit configurations
|
|
25
23
|
default_install_hook_types:
|
|
26
24
|
- prepare-commit-msg
|
|
@@ -12,4 +12,12 @@
|
|
|
12
12
|
[](https://commitizen-tools.github.io/commitizen/)
|
|
13
13
|
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
|
|
14
14
|
|
|
15
|
-
Git hooks intended for developers using [pre-commit](https://pre-commit.com/).
|
|
15
|
+
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Configurations for [pre-commit](https://pre-commit.com/)
|
|
20
|
+
|
|
21
|
+
```yaml title="Sources / .pre-commit-config.yaml"
|
|
22
|
+
--8<-- ".pre-commit-config.yaml"
|
|
23
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Configurations
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
# Variables
|
|
7
|
+
docs_path=$(cd "$(dirname "${BASH_SOURCE:-${0}}")" && pwd -P)
|
|
8
|
+
root_path="${docs_path%/*}"
|
|
9
|
+
|
|
10
|
+
# Prepare cache
|
|
11
|
+
rm -f "${docs_path}/.cache/*.md"
|
|
12
|
+
mkdir -p "${docs_path}/.cache/"
|
|
13
|
+
cp -rfv "${docs_path}/"*.md "${docs_path}/.cache/"
|
|
14
|
+
|
|
15
|
+
# Export assets
|
|
16
|
+
rm -rf "${docs_path}/.cache/assets/images"
|
|
17
|
+
mkdir -p "${docs_path}/.cache/assets/images/"
|
|
18
|
+
cp -f "${root_path}/docs/preview.svg" "${docs_path}/.cache/assets/images/"
|
|
19
|
+
|
|
20
|
+
# Export usage
|
|
21
|
+
cp -f "${root_path}/README.md" "${docs_path}/.cache/index.md"
|
|
22
|
+
sed -i "s#\(\[.*\]\)(.*/docs/#\1(assets/images/#g" "${docs_path}/.cache/index.md"
|
|
23
|
+
|
|
24
|
+
# Export commits
|
|
25
|
+
{
|
|
26
|
+
echo ''
|
|
27
|
+
echo '---'
|
|
28
|
+
echo ''
|
|
29
|
+
cz info | sed \
|
|
30
|
+
-e '1{ /^$/d }' \
|
|
31
|
+
-e '/^</,$ { /^</ { s/^/```powershell\n/ }; ${ s/^/```/ } }' \
|
|
32
|
+
-e 's/^\(- \)\{0,1\}\([a-z0-9 ]\{1,\}\): /\1**`\2`:** /g' \
|
|
33
|
+
-e '/^- /s/ \([Bb]uild\|[Bb]ug[s]*\|[Cc]osmetic\|CI\|[Dd]ocumentation\|[Ff]eature[s]*\|[Ff]ixe[s]*\|[Ii]mprove\|[Ii]ssue[s]*\|[Ll]ocal\|[Nn]either\|[Nn]on-production\|[Pp]erformance\|[Ss]ecurity\|[Tt]emporary\|[Tt]est[s]*\)/ **\1**/g' \
|
|
34
|
+
-e 's/\(A scope\|changed file\|modified feature\|within parenthesis\)/**\1**/g' \
|
|
35
|
+
-e 's/\(e.g.\) \([^.]*\)/\1 `\2`/g' \
|
|
36
|
+
-e 's/\(example:\) \([^)]*\)/**\1** `\2`/g' \
|
|
37
|
+
-e "s/\(BREAKING CHANGE[:]*\)/**\`\1\`**/g" \
|
|
38
|
+
-e 's/\(conventional commits\|semantic versioning\)/**\1**/g' \
|
|
39
|
+
-e "s/ '\([A-Za-z0-9:!]\{1,\}\)' / **\`\1\`** /g" \
|
|
40
|
+
-e 's/^\([^#]\{1,\}\)$/\1 /g' \
|
|
41
|
+
-e '/^[^#\[<]\{1\}[^`]\{1,\}/s/^/\ \ \ \ /g'
|
|
42
|
+
echo ''
|
|
43
|
+
echo '---'
|
|
44
|
+
echo ''
|
|
45
|
+
echo '## Commit example'
|
|
46
|
+
echo ''
|
|
47
|
+
echo '```ruby'
|
|
48
|
+
cz example
|
|
49
|
+
echo '```'
|
|
50
|
+
} >>"${docs_path}/.cache/commits.md"
|
|
51
|
+
|
|
52
|
+
# Export about/changelog
|
|
53
|
+
mkdir -p "${docs_path}/.cache/about/"
|
|
54
|
+
cp -f "${root_path}/CHANGELOG.md" "${docs_path}/.cache/about/changelog.md"
|
|
55
|
+
|
|
56
|
+
# Export about/license
|
|
57
|
+
{
|
|
58
|
+
echo '# License'
|
|
59
|
+
echo ''
|
|
60
|
+
echo '---'
|
|
61
|
+
echo ''
|
|
62
|
+
cat "${root_path}/LICENSE"
|
|
63
|
+
} >"${docs_path}/.cache/about/license.md"
|
|
64
|
+
|
|
65
|
+
# Show cache
|
|
66
|
+
echo ' '
|
|
67
|
+
ls -laR "${docs_path}/.cache/"
|
|
68
|
+
echo ' '
|
|
@@ -45,6 +45,11 @@ Executor('pre-commit-crocodile --run',
|
|
|
45
45
|
wait(1).\
|
|
46
46
|
finish()
|
|
47
47
|
|
|
48
|
+
# Clear terminal
|
|
49
|
+
Executor('clear',
|
|
50
|
+
delay_init=0.1, delay_prompt=2.0).\
|
|
51
|
+
finish()
|
|
52
|
+
|
|
48
53
|
# Add hooks changes
|
|
49
54
|
Executor('git add -v ./.cz.yaml ./.pre-commit-config.yaml',
|
|
50
55
|
delay_init=0.1, delay_prompt=1.0).\
|
|
@@ -57,6 +62,11 @@ Executor('git commit -m "chore(pre-commit): import \'pre-commit-crocodile\' conf
|
|
|
57
62
|
wait(1).\
|
|
58
63
|
finish()
|
|
59
64
|
|
|
65
|
+
# Clear terminal
|
|
66
|
+
Executor('clear',
|
|
67
|
+
delay_init=0.1, delay_prompt=2.0).\
|
|
68
|
+
finish()
|
|
69
|
+
|
|
60
70
|
# Add first changes
|
|
61
71
|
Executor('git add -p ./docs/',
|
|
62
72
|
delay_init=0.1, delay_press=0.2, delay_prompt=1.0).\
|
|
@@ -108,6 +118,11 @@ Executor('git show',
|
|
|
108
118
|
wait(1).\
|
|
109
119
|
finish()
|
|
110
120
|
|
|
121
|
+
# Clear terminal
|
|
122
|
+
Executor('clear',
|
|
123
|
+
delay_init=0.1, delay_prompt=2.0).\
|
|
124
|
+
finish()
|
|
125
|
+
|
|
111
126
|
# Add second changes
|
|
112
127
|
Executor('git add -p ./src/',
|
|
113
128
|
delay_init=0.1, delay_press=0.2, delay_prompt=1.0).\
|