1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
Description: Remove git usage and do not build gem
Upstream has updated the script to generate proto sources and it now
generates and builds the gem in a temporary directory. This patch will
make sure that source files are generated inplace and gem is not built.
See https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4982
Author: Mohammed Bilal <mdbilal@disroot.org>
Forwarded: not-needed
Last-Update: 2024-02-11
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -57,18 +57,18 @@
ref = capture!(%w[git rev-parse --short HEAD]).chomp
version = "#{matches[1]}-#{ref}"
- else
- ref = capture!(%w[git describe --tag]).chomp
- if ref != "v#{version}"
- abort "Checkout tag v#{version} to publish.\n\t git checkout v#{version}"
- end
+# else
+# ref = capture!(%w[git describe --tag]).chomp
+# if ref != "v#{version}"
+# abort "Checkout tag v#{version} to publish.\n\t git checkout v#{version}"
+# end
end
- puts 'Testing for changed files'
- run!(%w[git diff --quiet --exit-code])
+# puts 'Testing for changed files'
+# run!(%w[git diff --quiet --exit-code])
- puts 'Testing for staged changes'
- run!(%w[git diff --quiet --cached --exit-code])
+# puts 'Testing for staged changes'
+# run!(%w[git diff --quiet --cached --exit-code])
if options[:working_dir]
output_dir = File.absolute_path(options[:working_dir])
@@ -82,6 +82,7 @@
end
end
+
def generate_sources(output_dir, version)
proto_output_dir = File.absolute_path(File.join(output_dir, 'ruby', 'proto', 'gitaly'))
@@ -124,7 +125,7 @@
"documentation_uri" => "https://gitlab-org.gitlab.io/gitaly",
}
- spec.files = Dir['**/*.rb']
+ spec.files = Dir.glob("ruby/proto/**/*")
spec.require_paths = [prefix]
spec.add_dependency "grpc", "~> 1.0"
@@ -134,8 +135,8 @@
gemspec_path = File.absolute_path(File.join(output_dir, 'gitaly.gemspec'))
open(gemspec_path, 'w') { |f| f.write(gemspec) }
- run!(['gem', 'build', gemspec_path, '--output', output_path], output_dir)
- abort "gem not found" unless File.exist?(output_path)
+# run!(['gem', 'build', gemspec_path, '--output', output_path], output_dir)
+# abort "gem not found" unless File.exist?(output_path)
end
def write_version_file(output_dir, version)
|