Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-shell
Commits
cd9e7963
Commit
cd9e7963
authored
Oct 18, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore hooks PATH before calling ruby.
parent
dbdcc5f4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
50 deletions
+68
-50
CHANGELOG
CHANGELOG
+3
-0
hooks/post-receive
hooks/post-receive
+4
-17
hooks/post-receive-main.rb
hooks/post-receive-main.rb
+18
-0
hooks/pre-receive
hooks/pre-receive
+4
-17
hooks/pre-receive-main.rb
hooks/pre-receive-main.rb
+18
-0
hooks/update
hooks/update
+4
-16
hooks/update-main.rb
hooks/update-main.rb
+17
-0
No files found.
CHANGELOG
View file @
cd9e7963
v2.3.0
- Restore PATH before calling hooks
v2.2.0
- Support for custom hooks (Drew Blessing and Jose Kahan)
...
...
hooks/post-receive
View file @
cd9e7963
#!/usr/bin/env
ruby
#!/usr/bin/env
bash
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
refs
=
ARGF
.
read
key_id
=
ENV
[
'GL_ID'
]
repo_path
=
Dir
.
pwd
require_relative
'../lib/gitlab_custom_hook'
require_relative
'../lib/gitlab_post_receive'
if
GitlabPostReceive
.
new
(
repo_path
,
key_id
,
refs
).
exec
&&
GitlabCustomHook
.
new
.
post_receive
(
refs
,
repo_path
)
exit
0
else
exit
1
end
# Remove paths Git automatically prepends to PATH on hooks.
export
PATH
=
"
$GITLAB_PATH_OUTSIDE_HOOK
"
ruby
"
$GIT_DIR
/hooks/post-receive-main.rb"
hooks/post-receive-main.rb
0 → 100644
View file @
cd9e7963
#!/usr/bin/env ruby
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
refs
=
ARGF
.
read
key_id
=
ENV
[
'GL_ID'
]
repo_path
=
Dir
.
pwd
require_relative
'../lib/gitlab_custom_hook'
require_relative
'../lib/gitlab_post_receive'
if
GitlabPostReceive
.
new
(
repo_path
,
key_id
,
refs
).
exec
&&
GitlabCustomHook
.
new
.
post_receive
(
refs
,
repo_path
)
exit
0
else
exit
1
end
hooks/pre-receive
View file @
cd9e7963
#!/usr/bin/env
ruby
#!/usr/bin/env
bash
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
refs
=
ARGF
.
read
key_id
=
ENV
[
'GL_ID'
]
repo_path
=
Dir
.
pwd
require_relative
'../lib/gitlab_custom_hook'
require_relative
'../lib/gitlab_access'
if
GitlabAccess
.
new
(
repo_path
,
key_id
,
refs
).
exec
&&
GitlabCustomHook
.
new
.
pre_receive
(
refs
,
repo_path
)
exit
0
else
exit
1
end
# Remove paths Git automatically prepends to PATH on hooks.
export
PATH
=
"
$GITLAB_PATH_OUTSIDE_HOOK
"
ruby
"
$GIT_DIR
/hooks/pre-receive-main.rb"
hooks/pre-receive-main.rb
0 → 100755
View file @
cd9e7963
#!/usr/bin/env ruby
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
refs
=
ARGF
.
read
key_id
=
ENV
[
'GL_ID'
]
repo_path
=
Dir
.
pwd
require_relative
'../lib/gitlab_custom_hook'
require_relative
'../lib/gitlab_access'
if
GitlabAccess
.
new
(
repo_path
,
key_id
,
refs
).
exec
&&
GitlabCustomHook
.
new
.
pre_receive
(
refs
,
repo_path
)
exit
0
else
exit
1
end
hooks/update
View file @
cd9e7963
#!/usr/bin/env
ruby
#!/usr/bin/env
bash
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
ref_name
=
ARGV
[
0
]
old_value
=
ARGV
[
1
]
new_value
=
ARGV
[
2
]
repo_path
=
Dir
.
pwd
require_relative
'../lib/gitlab_custom_hook'
if
GitlabCustomHook
.
new
.
update
(
ref_name
,
old_value
,
new_value
,
repo_path
)
exit
0
else
exit
1
end
# Remove paths Git automatically prepends to PATH on hooks.
export
PATH
=
"
$GITLAB_PATH_OUTSIDE_HOOK
"
ruby
"
$GIT_DIR
/hooks/update-main.rb"
hooks/update-main.rb
0 → 100755
View file @
cd9e7963
#!/usr/bin/env ruby
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
ref_name
=
ARGV
[
0
]
old_value
=
ARGV
[
1
]
new_value
=
ARGV
[
2
]
repo_path
=
Dir
.
pwd
require_relative
'../lib/gitlab_custom_hook'
if
GitlabCustomHook
.
new
.
update
(
ref_name
,
old_value
,
new_value
,
repo_path
)
exit
0
else
exit
1
end
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