Useful scripts to be used only by developers in their development environment.
scripts-dev-env-only
| .gitignore
| main.py
| README.md
| requirements.txt
|
|
+---build
| scripts-dev-env-only.zip
|
+---src
| | git_setup_hook.py
| |
| +---config
| | config.yaml
| |
| +---utils
| | utils_funcs_git_setup_hook.py
| | utils_funcs_global.py
| | __init__.py
| |
| |
| |
| |
| |
| +---workspace_git
| +---set_up_hooks
| +---my_hooks
| +---commit-msg
| | my_commit_msg_v1
| | my_commit_msg_v1_description
| |
| +---pre-commit
| my_pre_commit_v1
| my_pre_commit_v1_description
| my_pre_commit_v2
| my_pre_commit_v2_description
|
+---utils
utils_funcs.py
__init__.py
- Execute main.py and you will get a menu
- Choose the action you want to be executed
Create a zip build in /build directory
scripts-dev-env-only
| README.md
| requirements.txt
|
+---src
| git_setup_hook.py
|
+---config
| config.yaml
|
+---utils
| utils_funcs_git_setup_hook.py
| utils_funcs_global.py
| __init__.py
|
+---workspace_git
+---set_up_hooks
+---my_hooks
+---commit-msg
| my_commit_msg_v1
| my_commit_msg_v1_description
|
+---pre-commit
my_pre_commit_v1
my_pre_commit_v1_description
my_pre_commit_v2
my_pre_commit_v2_description
- Take the build scripts-dev-env-only.zip and unzip it
- Put the unzipped folder on the root of your project folder
- Ignore tracking scripts-dev-env-only folder (add **/scripts-dev-env-only/ to .gitignore file of your project folder)
- Install dependencies for this module from requirements.txt file:
> pip install -r <relatif path of requirements.txt file>After that you will be able to execute useful scripts which contains scripts-dev-env-only folder.
Description:
This script automatically sets up a Git hook in the current repository when executed.
Usage:
python <relatif path to git_setup_hook.py>
Environments:
- os: windows 11
- python version: 3.14.0
- git version: 2.51.1.windows.1
Warning: It will probably need to be adapted if the environment changes.
Note:
This script needs to be run only once per repository.
The hook will then be triggered automatically on every git command which trigger it (e.g. `git commit` command to
trigger 'commit-msg' hook).
This script is used to create commit-msg hook in the default .git/hooks filder.
my_commit_msg_v1:
- Description in ./python/git/my_hooks/commit-msg/my_commit_msg_v1_description
This script is used to create commit-msg hook in the default .git/hooks folder.
my_pre-commit_v1:
- Description in ./python/git/my_hooks/pre-commit/my_pre_commit_v1_description
J.SAIDI