File: test-gem-install

package info (click to toggle)
ruby-nokogiri 1.13.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,416 kB
  • sloc: ansic: 38,198; xml: 28,086; ruby: 22,271; java: 15,517; cpp: 7,037; yacc: 244; sh: 148; makefile: 136
file content (43 lines) | stat: -rwxr-xr-x 916 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /usr/bin/env bash
#
#  run as part of CI, see gem-install.yml
#
if [[ $# -lt 1 ]] ; then
  echo "usage: $(basename $0) <gems_dir> [install_flags]"
  exit 1
fi

GEMS_DIR=$1
shift
INSTALL_FLAGS=$*

test -e /etc/os-release && cat /etc/os-release

set -e -x -u

pushd $GEMS_DIR

  gemfile=$(ls *.gem | head -n1)
  ls -l ${gemfile}
  gem install --no-document ${gemfile} -- ${INSTALL_FLAGS}
  gem list -d nokogiri
  nokogiri -v

popd

if [ -n "${BUNDLE_APP_CONFIG:-}" ] ; then
  export BUNDLE_CACHE_PATH="${BUNDLE_APP_CONFIG}/cache"
fi

gem install bundler -v "~> 2.2"
bundle install --local || bundle install

rm -rf lib ext # ensure we don't use the local files
rake test

./scripts/test-gem-installation

# delete the Gemfile because that's confusing to older versions of rubygems (e.g., bionic32)
rm -f Gemfile Gemfile.lock
./scripts/test-nokogumbo-compatibility 2.0.4
./scripts/test-nokogumbo-compatibility 2.0.5