diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-10-28 09:03:52 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-10-28 09:10:02 +0300 |
commit | 43fe495289974aa25c758018b300f9420c485870 (patch) | |
tree | c1402a735a5be1fcef71672e1673db9812f37d6c /gitaly.gemspec | |
parent | 49d098476b160a2c938eed0d0cd1616c8dd5d9a6 (diff) |
tools/protogem: Generate Protobuf sources ad-hoc when building Gem
The Ruby sidecar is slowly nearing its end: right now, it only
implements a single RPC that is in the process of being migrated to Go.
This means we'll start to soon remove all the Ruby infrastructure in the
Gitaly project.
Part of the infrastructure is the Ruby code generated from our Protobuf
definitions. And while we won't need that code ourselves anymore, it is
important for clients written in Ruby that want to interface with us. As
such, the Gitaly project still has to release the `gitaly` Gem. In the
past, we built the Gem by simply soaking up the code in `ruby/proto`.
But as it does not make any sense for us to keep the Ruby code around
anymore this strategy will fail once we have removed it.
Merge the `generate-proto-ruby` any `publish-gem` scripts into a single
script that:
1. Generates all required Ruby sources into a temporary directory.
2. Writes the `gitaly.gemspec` file into the same directory.
3. Builds the Gitaly Gem from those temporary files.
Like this, all code is generated ad-hoc and doesn't need to be committed
to the repository anymore.
Change the Makefile's `proto` target to not generate Ruby code anymore.
Instead, there are two new Makefile targets `build-proto-gem` and
`publish-proto-gem` that are responsible for building and publishing the
Gem, respecfively.
The generated Ruby code is thus stale now and will be removed in a
subsequent commit.
Diffstat (limited to 'gitaly.gemspec')
-rw-r--r-- | gitaly.gemspec | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/gitaly.gemspec b/gitaly.gemspec deleted file mode 100644 index 80095c4ce..000000000 --- a/gitaly.gemspec +++ /dev/null @@ -1,21 +0,0 @@ -# coding: utf-8 -prefix = 'ruby/proto' -$LOAD_PATH.unshift(File.expand_path(File.join(prefix), __dir__)) -require 'gitaly/version' - -Gem::Specification.new do |spec| - spec.name = "gitaly" - spec.version = Gitaly::VERSION - spec.authors = ["Jacob Vosmaer"] - spec.email = ["jacob@gitlab.com"] - - spec.summary = %q{Auto-generated gRPC client for gitaly} - spec.description = %q{Auto-generated gRPC client for gitaly.} - spec.homepage = "https://gitlab.com/gitlab-org/gitaly" - spec.license = "MIT" - - spec.files = `git ls-files -z #{prefix}`.split("\x0").reject { |f| f.match(%r{^#{prefix}/(test|spec|features)/}) } - spec.require_paths = [prefix] - - spec.add_dependency "grpc", "~> 1.0" -end |