-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create bazel ruby release target #10789
Conversation
ruby/build_release.sh
Outdated
chmod -R 777 ./ | ||
|
||
# Build gem | ||
bash --login -c "rvm use system && gem build google-protobuf.gemspec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"system" could be jruby couldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it could, what should I set this to to get a reasonable ruby version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave it alone and just require the caller to set the ruby version. The future plan for Bazel+Ruby is that our ruby rules will use the system ruby by default, with an optional flag to pin a specific version. So we could just run this twice, once with cruby and once with jruby
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave it alone meaning don't call rvm use
and just call gem build google-protobuf.gemspec
? Isn't that also just defaulting to the system version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. It defaults to the current version (which is distinct from rvm's "system" I believe), but it doesn't make any assumptions about what that version is. So if we want to produce both c-ruby and java-ruby artifacts, we'd use rvm to set our version and run this target twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved offline. Will wait to submit until we have implemented a flag to specify ruby versions.
ruby/build_jruby_release.sh
Outdated
|
||
set -ex | ||
|
||
WORKING_DIR=$(dirname $(readlink $BASH_SOURCE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use inline_sh_binary instead of sh_binary, you can take advantage of Bazel make variables. Right now, this is highly non-hermetic, and runs over the non-sandboxed source tree
bb6000d
to
d5fd41d
Compare
Create
ruby:release
bazel target that builds 2 gems for release (one just source and one for java).