blob: a94ab467cb6b4c7e44dd99a771e04d45354016a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env ruby
gitaly_proto_line = `govendor list | grep gitaly-proto` # safe to use backticks, no string interpolation
abort unless $?.success?
puts gitaly_proto_line
# Not sure what 'version_a' and 'version_b' are exactly, they seem to be identical most of the time.
_, _, _, version_a, version_b = gitaly_proto_line.split(/\s+/, 5)
tag_regex = /^v[0-9]/
unless version_a =~ tag_regex && version_b =~ tag_regex
abort "FAIL: govendor is not using a tagged version of gitaly-ruby"
end
puts 'OK'
|