diff options
author | Paul Okstad <pokstad@gitlab.com> | 2019-08-07 18:44:24 +0300 |
---|---|---|
committer | Paul Okstad <pokstad@gitlab.com> | 2019-08-07 18:44:24 +0300 |
commit | 86b83ac844fd2e4286563d0aa30d3d5ba37217c5 (patch) | |
tree | dc996d5fd548c5dc52973118561b3c8624b4a532 | |
parent | 1e7736fb1be618eddd60aec8e820f96b01ceb17b (diff) | |
parent | 1b407318a6a865f61eaf25f135af7f06ba69e9e5 (diff) |
Merge branch 'jv-proto-gem' into 'master'
Publish Ruby stubs as 'gitaly' gem
See merge request gitlab-org/gitaly!1401
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | _support/publish | 4 | ||||
-rwxr-xr-x | _support/release | 1 | ||||
-rw-r--r-- | gitaly.gemspec | 21 |
4 files changed, 27 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index b7fbb0b4c..cde28605c 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ git-env gitaly.pid /vendor/github.com/libgit2/git2go/vendor /vendor +/gitaly-*.gem diff --git a/_support/publish b/_support/publish index 76ca456f7..e550db462 100755 --- a/_support/publish +++ b/_support/publish @@ -19,11 +19,15 @@ def main(tag) abort "Git remote 'origin' must match #{REMOTE_REGEX}, got #{remote.inspect}" end + gem = "gitaly-#{tag.sub(/^v/, '')}.gem" + abort "gem not found: #{gem}" unless File.exist?(gem) + puts "Proceed to publish version #{tag}? Enter 'Yes' to continue; Ctrl-C to abort" $stdout.flush abort unless $stdin.gets.chomp == 'Yes' run!(%W[git push origin HEAD #{tag}]) + run!(%W[gem push #{gem}]) end unless ARGV.count == 1 diff --git a/_support/release b/_support/release index 712fdfc27..cee8f46d3 100755 --- a/_support/release +++ b/_support/release @@ -26,6 +26,7 @@ def main(version) version_msg = "Version #{version}" run!(%W[git commit -m #{version_msg}]) + run!(%w[gem build gitaly.gemspec]) run!(%W[git tag -a -m #{version_msg} #{tag_name}]) # We use 'capture!' to prevent 'git show' from invoking 'less'. diff --git a/gitaly.gemspec b/gitaly.gemspec new file mode 100644 index 000000000..80095c4ce --- /dev/null +++ b/gitaly.gemspec @@ -0,0 +1,21 @@ +# 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 |