Skip to content

[DEPRECATED] Usefull git hooks for Claroline Connect

Notifications You must be signed in to change notification settings

claroline/git-hooks

Repository files navigation

!!! DEPRECATED !!!

Git hooks are now bundled with the claroline distribution. For installation instructions, see claroline/Distribution#739 (comment).

A collection of Git Hooks for Claroline Connect

pre-commit : One pre-commit to rule them all. pre-commit-phpcs : Run PHP_CodeSniffer on all your PHP files to be commited. (Depends on php-cs-fixer) pre-commit-jshint : Run JSHint on all your JavaScript files to be commited. (Depends on jshint) pre-commit-image-optimize : Run pngcrush and jpegtran on your PNG files and JPG files to be commited. (Depends on pngcrush and jpegtran) pre-commit-phpunit : Run PHPUnit. (Depends on PHPUnit)

Installing

Instructions are for installing on an Ubuntu/Debian based system.

Install php-cs-fixer

sudo curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
sudo chmod a+x php-cs-fixer
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer

Install jshint

sudo apt-get install nodejs
sudo npm install -g jshint

Install pngcrush and jpegtran

sudo apt-get install pngcrush
sudo apt-get install libjpeg-progs

Install phpunit

wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit

Usage

RTFM : Installing git hooks

The hooks are all stored in the hooks subdirectory of the Git directory. In most projects, that’s .git/hooks, so basicly copy all the needed hooks into your .git/hooks directory and make sure they are executable.

About

[DEPRECATED] Usefull git hooks for Claroline Connect

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •