Skip to content
Snippets Groups Projects
Commit 0c0116c2 authored by jurgenhaas's avatar jurgenhaas
Browse files

bitegra/portal/drupal/projects/portal-default#8 Add git post-checkout hook to...

bitegra/portal/drupal/projects/portal-default#8 Add git post-checkout hook to write project and branch info to .env file
parent 0665b548
No related branches found
No related tags found
No related merge requests found
......@@ -246,3 +246,13 @@ if [[ -x "${L3DSHELL}" ]]; then
else
/usr/bin/fish
fi
if [[ ! -f .git/hooks/post-checkout ]]; then
echo "#!/bin/sh" > .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
fi
HOOK_DEFINED=$(grep /usr/local/bin/update-env .git/hooks/post-checkout)
if [[ "$HOOK_DEFINED" = "" ]]; then
echo "/usr/local/bin/update-env" >> .git/hooks/post-checkout
fi
/usr/local/bin/update-env
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment