- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2021
03:32 AM
10-25-2021
03:32 AM
Add pre-commit git hook to magento cloud
Hello, I'm trying to add pre-commit git hook and deploy it on magento cloud project. I've tried to do this via composer json
"scripts": { "post-install-cmd": [ "git config core.hooksPath .githooks" ], "post-update-cmd": [ "git config core.hooksPath .githooks" ] }
And during building application on the cloud I've got an error
W: > git config core.hooksPath .githooks W: fatal: not in a git directory W: Script git config core.hooksPath .githooks handling the post-install-cmd event returned with error code 128
Seems like git repo is removed during deployment on magento cloud. Is it correct? How can I add that git hook in this case?
Thanks in advance.
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2021
07:36 PM
11-08-2021
07:36 PM
Re: Add pre-commit git hook to magento cloud
The core.hooksPath support is new in Git version 2.9, having been put in with commit 867ad08a2610526edb5723804723d371136fc643.
If your Git version is not at least 2.9.0, setting a hooks-path variable will have no effect at all.
LitExtension - #1 Shopping Cart Migration Expert
LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.
Visit website: http://litextension.com/
LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.
Visit website: http://litextension.com/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2021
03:58 AM
11-09-2021
03:58 AM
Re: Add pre-commit git hook to magento cloud
You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up.