diff options
Diffstat (limited to 'danger/govendor_proto_check/Dangerfile')
-rw-r--r-- | danger/govendor_proto_check/Dangerfile | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/danger/govendor_proto_check/Dangerfile b/danger/govendor_proto_check/Dangerfile index 9f186fc4b..035baa81e 100644 --- a/danger/govendor_proto_check/Dangerfile +++ b/danger/govendor_proto_check/Dangerfile @@ -1,15 +1,5 @@ -require 'json' - -VENDOR_JSON = 'vendor/vendor.json' - -if git.modified_files.include?(VENDOR_JSON) - parsed_json = JSON.parse(File.read(VENDOR_JSON)) - - proto = parsed_json["package"]&.find { |h| h["path"].start_with?("gitlab.com/gitlab-org/gitaly-proto") } - - unless proto["version"] && proto["version"] =~ /\Av\d+\./ - fail("gitaly-proto version is incorrect") - end +if git.modified_files.include?('go.mod') && !system('_support/gitaly-proto-tagged') + fail("gitaly-proto version is incorrect") end # vim: ft=ruby |