From 4b7d0c5689f160fa4f6cfb29645f09a349fd045a Mon Sep 17 00:00:00 2001 From: akutz Date: Thu, 2 Jan 2025 08:49:06 -0600 Subject: [PATCH] api: Specify ruby bundler for api gen This patch updates the Dockerfile used to generate API bindings to specify an explicit version of the Ruby bundler program. This is required since an older version of Ruby is used as the newer ones are not compatible with the API generation code. Signed-off-by: akutz --- gen/Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gen/Dockerfile b/gen/Dockerfile index bc4ef545b..853d29987 100644 --- a/gen/Dockerfile +++ b/gen/Dockerfile @@ -55,8 +55,9 @@ ENV PATH="/root/.rbenv/shims:${PATH}" \ RUN apt-get install -y rbenv && \ rbenv install 2.7.6 && \ rbenv rehash && \ - rbenv global 2.7.6 && \ - gem install bundler + rbenv global 2.7.6 + +RUN gem install bundler -v 2.4.22 ## -------------------------------------- @@ -71,6 +72,11 @@ WORKDIR /govmomi/gen ## -------------------------------------- COPY Gemfile Gemfile.lock . -RUN go install golang.org/x/tools/cmd/goimports@latest && \ - bundle update --bundler && \ - bundle install +RUN bundle update --bundler && bundle install + + +## -------------------------------------- +## Install goimports to forma gen'd files +## -------------------------------------- + +RUN go install golang.org/x/tools/cmd/goimports@latest