File: appraise

package info (click to toggle)
ruby-otr-activerecord 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: ruby: 561; sh: 133; makefile: 6
file content (24 lines) | stat: -rwxr-xr-x 568 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

if [[ $# -lt 3 ]]; then
  echo "Use: bin/appraise ruby-X ar-X [args]"
  exit 1
fi

set -euo pipefail

cd $(dirname $0)/../

ruby_version=$1
ar_version=$2
shift 2

args="$@"
exec env bin/run ${ruby_version} bash -c '
  BVER=$(tail -n 1 Gemfile.lock | sed "s/ //g")
  if ! gem list bundler --exact | grep $BVER > /dev/null; then
    gem install bundler -v $BVER
  fi
  bundle install && \
    bundle exec appraisal '${ar_version}' bundle install && \
    TEST_DATABASE_URL="'${TEST_DATABASE_URL-}'" bundle exec appraisal '${ar_version}" ${args[@]}"