diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2019-01-11 18:34:21 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2019-01-11 18:55:40 +0300 |
commit | 2199d803e4f80553448795f979836fe6aa3a353d (patch) | |
tree | 886721e64b75c0fa5b0fb3b06ecab25c9355c773 /ruby/vendor/gitlab-shell/hooks/update | |
parent | b9b83e36794a9f01a33e0efa2b3b32392750faf6 (diff) |
Vendor gitlab-shell at 6c5b195353a632095d7f6
Diffstat (limited to 'ruby/vendor/gitlab-shell/hooks/update')
-rwxr-xr-x | ruby/vendor/gitlab-shell/hooks/update | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ruby/vendor/gitlab-shell/hooks/update b/ruby/vendor/gitlab-shell/hooks/update new file mode 100755 index 000000000..4c2fc08b0 --- /dev/null +++ b/ruby/vendor/gitlab-shell/hooks/update @@ -0,0 +1,18 @@ +#!/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 +key_id = ENV.delete('GL_ID') + +require_relative '../lib/gitlab_custom_hook' + +if GitlabCustomHook.new(repo_path, key_id).update(ref_name, old_value, new_value) + exit 0 +else + exit 1 +end |