summaryrefslogtreecommitdiff
path: root/hooks/update-main.rb
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/update-main.rb')
-rwxr-xr-xhooks/update-main.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/hooks/update-main.rb b/hooks/update-main.rb
new file mode 100755
index 0000000..f1ac8e7
--- /dev/null
+++ b/hooks/update-main.rb
@@ -0,0 +1,17 @@
+#!/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