Skip to content

Git Hooks - Laravel Package developed to automate and change the main folder referring to git hooks.

Notifications You must be signed in to change notification settings

atlastechnol/package-laravel-git-hooks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Git Hooks

Package developed to automate and change the main folder referring to git hooks.

Installation

Add private repository in composer json file:

{
  ...
  "repositories": [
    {
      "type": "vcs",
      "url": "[email protected]:atlastechnol/package-laravel-git-hooks.git"
    }
  ]
}

Require this package with composer:

composer require --dev rsgabrielrm/laravel-git-hooks

You can install the package:

php artisan laravel-git-hooks:install

Usage

Change the pre-commit template file created in .gitHooks/ and add the action you want to take before the user successfully commits.

Example if you are using docker:

#!/bin/sh
. "$(dirname "$0")/_/hooks.sh"

cd ..
containerName='enter-the-container-name'
docker-compose up --detach --no-deps --no-recreate ${containerName}
docker-compose exec -T ${containerName} php artisan test

You can use other git hooks as per the documentation.

Credits

This package was inspired by the npm husky package.

Package created by Gabriel Menezes.

About

Git Hooks - Laravel Package developed to automate and change the main folder referring to git hooks.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 72.7%
  • Shell 27.3%