-
Notifications
You must be signed in to change notification settings - Fork 555
/
Copy pathintegration.sh
executable file
·36 lines (30 loc) · 1005 Bytes
/
integration.sh
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
#!/bin/bash
set -eo pipefail
# Get requested ruby versions. Use the default if not given.
ruby_versions=($RUBY_VERSIONS)
if [ "${#ruby_versions[@]}" = "0" ]; then
ruby_versions=(DEFAULT)
fi
# Run tests against all requested ruby versions.
for ruby_version in "${ruby_versions[@]}"; do
# Interpret special symbolic version names.
if [ "$ruby_version" = "OLDEST" ]; then
ruby_version=$OLDEST_RUBY_VERSION
elif [ "$ruby_version" = "NEWEST" ]; then
ruby_version=$NEWEST_RUBY_VERSION
elif [ "$ruby_version" = "DEFAULT" ]; then
ruby_version=
fi
if [ -n "$ruby_version" ]; then
echo "**** USING RUBY $ruby_version ****"
rbenv local "$ruby_version"
else
echo "**** USING DEFAULT RUBY ****"
fi
# Install gems in the user directory because the default install directory
# is in a read-only location.
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH
gem install --no-document toys
toys ci -v --load-kokoro-context $EXTRA_CI_ARGS < /dev/null
done