Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
981aac02
Commit
981aac02
authored
Jan 02, 2018
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update script to work only when run in the gitlab directory.
parent
cbb38fde
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
scripts/add-code-formatters
scripts/add-code-formatters
+13
-2
No files found.
scripts/add-code-formatters
View file @
981aac02
#!/bin/sh
if
[
!
-f
../GDK_ROOT
]
;
then
echo
"Please run script from gitlab (e.g. gitlab-development-kit/gitlab) root directory."
exit
1
fi
touch
./.git/hooks/pre-commit
ln
-s
./pre-commit .git/hooks/pre-commit
PRECOMMIT
=
$(
git rev-parse
--git-dir
)
/hooks/pre-commit
if
[
-f
$PRECOMMIT
]
;
then
echo
"Pre-commit script already installed."
exit
1
fi
ln
-s
./pre-commit
$PRECOMMIT
echo
"Pre-commit script installed successfully"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment