Sha256: 36bb446396aef24c8fb17c2cae62cbd10f449562558d80eda7c5e629d29d160b
Contents?: true
Size: 713 Bytes
Versions: 248
Compression:
Stored size: 713 Bytes
Contents
#!/bin/bash set -eu actual_ruby_version=$(ruby --version) if [[ "$actual_ruby_version" == *"jruby"* ]]; then # Replace "-" from specified RUBY_VERSION string. Semaphore/rbenv version uses # a dash, where `jruby --version` uses a space. sanitized_ruby_version="${RUBY_VERSION//-/ }" else # Strip "-" from specified RUBY_VERSION string. Semaphore/rbenv version uses # a dash, where `ruby --version` does not. sanitized_ruby_version="${RUBY_VERSION//-}" fi if [[ "$actual_ruby_version" == *"$sanitized_ruby_version"* ]]; then echo "Ruby version is $RUBY_VERSION" exit 0 else echo "Ruby version is: $actual_ruby_version" echo "Ruby version should be: $sanitized_ruby_version" exit 1 fi
Version data entries
248 entries across 248 versions & 1 rubygems