Commit 53fed51b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #186 from cirosantilli/restore-path

Restore hooks PATH before calling ruby.
parents dbdcc5f4 cd9e7963
v2.3.0
- Restore PATH before calling hooks
v2.2.0 v2.2.0
- Support for custom hooks (Drew Blessing and Jose Kahan) - Support for custom hooks (Drew Blessing and Jose Kahan)
......
#!/usr/bin/env ruby #!/usr/bin/env bash
# This file was placed here by GitLab. It makes sure that your pushed commits # Remove paths Git automatically prepends to PATH on hooks.
# will be processed properly. export PATH="$GITLAB_PATH_OUTSIDE_HOOK"
ruby "$GIT_DIR/hooks/post-receive-main.rb"
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
#!/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
#!/usr/bin/env ruby #!/usr/bin/env bash
# This file was placed here by GitLab. It makes sure that your pushed commits # Remove paths Git automatically prepends to PATH on hooks.
# will be processed properly. export PATH="$GITLAB_PATH_OUTSIDE_HOOK"
ruby "$GIT_DIR/hooks/pre-receive-main.rb"
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
#!/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
#!/usr/bin/env ruby #!/usr/bin/env bash
# This file was placed here by GitLab. It makes sure that your pushed commits # Remove paths Git automatically prepends to PATH on hooks.
# will be processed properly. export PATH="$GITLAB_PATH_OUTSIDE_HOOK"
ruby "$GIT_DIR/hooks/update-main.rb"
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
#!/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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment