Skip to content

Commit

Permalink
Revert RUBY_MAJOR refactoring for 3.0
Browse files Browse the repository at this point in the history
(since it's effectively EOL now except the possibility of a severe regression: https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/)
  • Loading branch information
tianon committed Apr 23, 2024
1 parent a2b957f commit 1db5a7b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions 3.0/alpine3.16/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.0/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.0/buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.0/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.0/slim-buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ RUN set -eux; \
} >> /usr/local/etc/gemrc

ENV LANG C.UTF-8
{{ if .version | . == "3.0.6" or . == "3.1.4" or . == "3.2.2" then ( -}}

This comment has been minimized.

Copy link
@mfittko

mfittko Apr 25, 2024

@tianon This made our RUBY_MAJOR env var we're relying on in our Dockerfile vanish. We're using this env var for setting the BUNDLE_BIN_PATH (e.g. vendor/bundle/ruby/3.1.0/...). So we were using ruby 3.1.4 and now with 3.1.5, the BUNDLE_BIN_PATH became vendor/bundle/ruby/.0. Sure, I can workaround this, but the change seems wrong and it might affect others!

This comment has been minimized.

Copy link
@tianon

tianon Apr 25, 2024

Author Member

53646d3#r141373813

Sorry for the breakage, but it is a variable we never intended to expose (and with a name that isn't really accurate for what it is).


# https://www.ruby-lang.org/{{ .post | ltrimstr("/") }}
{{ if env.version == "3.0" then ( -}}
ENV RUBY_MAJOR {{ env.version }}
ENV RUBY_VERSION {{ .version }}
ENV RUBY_DOWNLOAD_SHA256 {{ .sha256.xz }}
{{ ) else ( -}}

# https://www.ruby-lang.org/{{ .post | ltrimstr("/") }}
ENV RUBY_VERSION {{ .version }}
ENV RUBY_DOWNLOAD_URL {{ .url.xz }}
ENV RUBY_DOWNLOAD_SHA256 {{ .sha256.xz }}
Expand Down Expand Up @@ -203,7 +203,7 @@ RUN set -eux; \
fi; \
{{ ) else "" end -}}
\
{{ if .version | . == "3.0.6" or . == "3.1.4" or . == "3.2.2" then ( -}}
{{ if env.version == "3.0" then ( -}}
{{ if .url.xz != "https://cache.ruby-lang.org/pub/ruby/\(env.version | rtrimstr("-rc"))/ruby-\(.version).tar.xz" then error("url for \(.version) is not as expected!") else "" end -}}
wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \
{{ ) else ( -}}
Expand Down

0 comments on commit 1db5a7b

Please sign in to comment.