Add a way to pin RubyGems and pin to 3.2

This commit is contained in:
Lin Jen-Shin 2022-06-21 22:59:02 +08:00
parent 44254ea95d
commit a00159f06f
5 changed files with 25 additions and 2 deletions

View file

@ -243,6 +243,20 @@ function print_bundler_args() {
printf -- "--build-arg BUNDLER_VERSION=%s " "$BUNDLER_VERSION"
}
function print_rubygems_args() {
case "$1" in
3.1)
RUBYGEMS_VERSION=3.1.6
;;
3.2)
RUBYGEMS_VERSION=3.2.33
;;
*) echo "Unknown rubygems version $1"; exit 1;
esac
printf -- "--build-arg RUBYGEMS_VERSION=%s " "$RUBYGEMS_VERSION"
}
function print_gcloud_args() {
case "$1" in
383)
@ -302,6 +316,7 @@ function parse_arguments() {
DEBIAN) CUSTOM_IMAGE_VERSION=$version ;;
RUBY) print_ruby_args $version ;;
BUNDLER) print_bundler_args $version ;;
RUBYGEMS) print_rubygems_args $version ;;
GOLANG) print_golang_args $version ;;
CHROME) print_chrome_args $version ;;
DOCKER) print_docker_args $version ;;