summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-02-24 09:59:15 -0700
committermo khan <mo.khan@gmail.com>2020-02-24 16:41:50 -0700
commit39afdc40296871d9f7c1732ff3f7e1e3b7b28bbe (patch)
tree8f547ce1077b89c732411fc28c4a9efa6730ceca /run.sh
parent525d7cb9a30bb14306d6a00919dc25313c632b64 (diff)
Exclude development/test dependenciesv2.5.2
* Remove develoment and test dependencies from java-maven fixtures * Ensure that ruby projects with bundler 2.0 are scannable * Update CHANGELOG * Assign @errors ivar for error message * Remove --cache-from * Use default ruby and install bundler conservatively * Install gems to local path * Add --no-prepare when gems are installed * Print ruby, rubygems and bundler version
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/run.sh b/run.sh
index 7296e00..8c7389b 100755
--- a/run.sh
+++ b/run.sh
@@ -117,19 +117,19 @@ case "$COMMAND" in
# This always end in the cryptic "bash: Searching: command not found" error but Ruby is installed
# So we ignore the error.
$($rvm_recommended_ruby) 2>/dev/null || true
- rvm use .
- gem install --no-document 'bundler:~> 1.7' 'bundler:~> 2.0'
- bundler_version=$(grep -A1 "BUNDLED WITH" Gemfile.lock | tail -n 1)
- gem install bundler -v "${bundler_version}" || gem install bundler
+ rvm use . || rvm use default
+ gem install --conservative --no-document 'bundler:~> 1.7' 'bundler:~> 2.0'
# rvm pulls outdated gems
# need this to update system bundler
# We need to install the license_finder gem into this Ruby version too.
gem install --no-document /opt/license-management/*.gem
fi
- # Ignore test and development dependencies.
- license_finder ignored_groups add development
- license_finder ignored_groups add test
+ ruby -v
+ gem --version
+ bundle --version
+ bundle config --local path 'vendor/bundle'
+ bundle config --local without 'development test'
bundle install --jobs $(nproc)
skip_prepare=true
fi
@@ -191,7 +191,11 @@ case "$COMMAND" in
echo "Running license_finder $@ in $PWD"
if [ "$skip_prepare" != true ]; then
prepare="--prepare-no-fail"
+ else
+ prepare="--no-prepare"
fi
+ license_management ignored_groups add development
+ license_management ignored_groups add test
echo "Preparing JSON report..."
license_management report ${prepare} --format=json --save=gl-license-management-report.json ${LICENSE_FINDER_CLI_OPTS}
popd > /dev/null