Skip to content

Commit bf9eeb6

Browse files
authored
Fix/realpath to basename (#153)
* Udpate way to calculate absolute path in install-deps * Use rvm head * Update condition * Remove manual openssl * Remove openssl 1.1 installation for old versions
1 parent 93b5b48 commit bf9eeb6

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/scripts/install-deps.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
2-
GEMFILE_ABS_PATH=$(realpath "$PARAM_GEMFILE")
2+
GEMFILE_ABS_PATH="$(cd "$(dirname "$PARAM_GEMFILE")" && pwd -P)/$(basename "$PARAM_GEMFILE")"
3+
4+
echo "$(cd "$(dirname LICENSE)" && pwd -P)/$(basename LICENSE)"
35
if bundle config set > /dev/null 2>&1; then
46
if [ "$PARAM_PATH" == "./vendor/bundle" ]; then
57
bundle config deployment 'true'

src/scripts/install-ruby.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
PARAM_RUBY_VERSION=$(eval echo "${PARAM_VERSION}")
44
RUBY_VERSION_MAJOR=$(echo "$PARAM_VERSION" | cut -d. -f1)
5+
RUBY_VERSION_MINOR=$(echo "$PARAM_VERSION" | cut -d. -f2)
56
detected_platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
6-
if [ "$detected_platform" = "darwin" ] && [ "$RUBY_VERSION_MAJOR" -le 2 ]; then
7-
brew install [email protected]
8-
OPENSSL_LOCATION="$(brew --prefix [email protected])"
9-
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$OPENSSL_LOCATION"
7+
8+
# When on MacOS, and versions minor or equal to 3.0.x. These are the versions depending on OpenSSL 1.1
9+
if [[ "$detected_platform" = "darwin" && ( "$RUBY_VERSION_MAJOR" -le 2 || ( "$RUBY_VERSION_MAJOR" -eq 3 && "$RUBY_VERSION_MINOR" -eq 0 ) ) ]]; then
1010
rbenv install $PARAM_RUBY_VERSION
1111
rbenv global $PARAM_RUBY_VERSION
1212
exit 0
@@ -21,7 +21,7 @@ elif ! openssl version | grep -q -E '1\.[0-9]+\.[0-9]+'; then
2121
# location of RVM is expected to be available at RVM_HOME env var
2222
WITH_OPENSSL="--with-openssl-dir=$RVM_HOME/usr"
2323
fi
24-
24+
rvm get master
2525
rvm install "$PARAM_RUBY_VERSION" "$WITH_OPENSSL"
2626
rvm use "$PARAM_RUBY_VERSION"
2727

src/scripts/install-rvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ echo 7D2BAF1CF37B13E2069D6956105BD0E739499BDB:6: | gpg --import-ownertrust
5757

5858
## Update if RVM is installed and exit
5959
if [ -x "$(command -v rvm -v)" ]; then
60-
rvm get stable
60+
rvm get head
6161
exit 0
6262
fi
6363

0 commit comments

Comments
 (0)