Skip to content

Commit d1e53ff

Browse files
committed
issue-862: update readme.md and commit-msg to reflect new envrc behaviour
1 parent 6949a01 commit d1e53ff

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

.envrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export LOCALHOST_PYTHON="$PWD/.nix-env/bin/python"
1818
git config core.hooksPath .git-hooks
1919

2020
echo ""
21-
echo " Git Hooks has been configured. Read more about them here: https://github.com/wireapp/wire-server-deploy?tab=readme-ov-file#optional-git-commit-message-verification or locally at README.md#optional-git-commit-message-verification"
21+
echo " Git Hooks has been configured in your current environment."
22+
echo " Read more about them here: https://github.com/wireapp/wire-server-deploy?tab=readme-ov-file#optional-git-commit-message-verification"
2223
echo " If you don't want to use it, run the following command to unset it"
2324
echo " git config --unset core.hooksPath"
2425
echo ""

.git-hooks/commit-msg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ if ! echo "$commit_message" | grep -E "$pattern" | grep -E "$pattern2"; then
1616
echo " refactor: wpb-1234 clean up code"
1717
echo " test: add unit tests wpb-1234"
1818
echo " chore!: WPB-1234 drop support for k8s 1.16 - add a 'BREAKING CHANGE:' statement"
19-
echo "Read more about it here: https://www.conventionalcommits.org/en/v1.0.0/"
19+
echo " Read more about it here: https://www.conventionalcommits.org/en/v1.0.0/"
20+
echo " If you want to skip these commit message verification rules, run the following command to unset it"
21+
echo " git config --unset core.hooksPath"
2022
exit 1
2123
fi

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,24 @@ This repository uses a Git commit [hook](./.git-hooks/commit-msg) to enforce the
9292
- *chore!: WPB-1234 drop support for k8s 1.16 - add a 'BREAKING CHANGE:' statement*
9393

9494
#### Activation/Deactivation:
95-
The commit hook is optional and can be activated or deactivated using the `.envrc` script with direnv:
96-
```
95+
The commit hook is optional and can be activated using the `.envrc` script with direnv as:
96+
```bash
9797
wire-server-deploy$ direnv allow
9898
direnv: loading ~/projects/git/wire-server-deploy/.envrc
99-
Do you want to setup git commit hooks? (y/Y to continue):
99+
direnv: ([/usr/bin/direnv export zsh]) is taking a while to execute. Use CTRL-C to give up.
100+
/nix/store/bbh6750da4dmnbizgwzh5q2g5z6njd81-wire-server-deploy
101+
direnv: loading ~/projects/git/wire-server-deploy/.nix-env/.nix-env/.profile
102+
103+
Git Hooks has been configured in your current environment.
104+
Read more about them here: https://github.com/wireapp/wire-server-deploy?tab=readme-ov-file#optional-git-commit-message-verification
105+
If you don't want to use it, run the following command to unset it
106+
git config --unset core.hooksPath
107+
108+
direnv: export +LOCALHOST_PYTHON +NIX_PATH ~PATH
109+
```
110+
111+
The `.git-hooks` get configured when the whole `.envrc` environment is allowed. Run the following command if hooks for commit message verification aren't required:
112+
113+
```bash
114+
git config --unset core.hooksPath
100115
```

0 commit comments

Comments
 (0)