Skip to content

Instantly share code, notes, and snippets.

View xandrkat's full-sized avatar
🎯
Your life in your mind.

Alexandr Katrazhenko xandrkat

🎯
Your life in your mind.
View GitHub Profile
@xandrkat
xandrkat / post-checkout
Last active July 12, 2023 12:24
git checkout/clone hook
#!/usr/bin/env sh
COMPOSER_JSON=$(pwd)/composer.json
PACKAGE_JSON=$(pwd)/package.json
if [ -f "$COMPOSER_JSON" ]; then
composer -v > /dev/null 2>&1
COMPOSER=$?
if [[ $COMPOSER -ne 0 ]]; then
echo 'Composer is not installed'