Sha256: 8c0110415d4d8c59cece976b57da858b31cec9c5f98fb73a749a1d8c0f951dc0

Contents?: true

Size: 740 Bytes

Versions: 1

Compression:

Stored size: 740 Bytes

Contents

#!/usr/bin/env bash

set -e

rm vgs_api_client-*.gem || true

if [[ -n "${LIB_VERSION}" ]]; then
  echo "Installing lib from rubygems.org ${LIB_VERSION} ..."

  set +e
  ATTEMPT=1
  while [  $ATTEMPT -lt 60 ]; do
    echo "Attempt ${ATTEMPT} ..."

    bundle install --without production --binstubs
    gem install vgs_api_client -v ${LIB_VERSION}

    if [[ $? == 0 ]]; then
      echo "Installed ${LIB_VERSION}"
      break
    fi

    ATTEMPT=$((ATTEMPT+1))

    sleep 5
  done
  set -e
else
  echo "Installing lib from local sources"
  # fix version
  VERSION=0.0.1.alpha$(date "+%Y%m%d%H%M")
  grep -rl 0.0.1.alpha202204202050 . | xargs sed -i "s/0.0.1.alpha202204202050/$VERSION/g"

  bundle install
fi

bundle exec rspec ./spec/*.rb

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vgs_api_client-0.0.1.alpha202204202050 scripts/test/run.sh