summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/docker-test2
-rwxr-xr-xrun.sh13
-rw-r--r--spec/support/integration_test_helper.rb2
3 files changed, 9 insertions, 8 deletions
diff --git a/bin/docker-test b/bin/docker-test
index b1965a3..e6f02ad 100755
--- a/bin/docker-test
+++ b/bin/docker-test
@@ -11,8 +11,10 @@ if [ -z "$LM_HOME" ]; then
docker run --rm \
--env LICENSE_FINDER_CLI_OPTS \
+ --env LM_JAVA_VERSION \
--env LM_PYTHON_VERSION \
--env LM_REPORT_VERSION \
+ --env MAVEN_CLI_OPTS \
--volume "$PROJECT_PATH":/code \
"$IMAGE_NAME" analyze /code
else
diff --git a/run.sh b/run.sh
index 53e9215..beae705 100755
--- a/run.sh
+++ b/run.sh
@@ -9,8 +9,9 @@ export BUNDLE_WITHOUT="development test"
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export HISTFILESIZE=0
export HISTSIZE=0
+export LICENSE_FINDER_CLI_OPTS=${LICENSE_FINDER_CLI_OPTS:-'--no-debug'}
export LICENSE_FINDER_PYTHON_VERSION="--python-version=3"
-export LICENSE_FINDER_CLI_OPTS=${LICENSE_FINDER_CLI_OPTS:-'--debug'}
+export LM_REPORT_FILE='gl-license-management-report.json'
export PREPARE="--prepare-no-fail"
export RUBY_GC_HEAP_INIT_SLOTS=800000
export RUBY_GC_MALLOC_LIMIT=79000000
@@ -18,7 +19,7 @@ export RUBY_HEAP_FREE_MIN=100000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_HEAP_SLOTS_INCREMENT=400000
-if [ -n "$LM_PYTHON_VERSION" ]; then
+if [[ -n ${LM_PYTHON_VERSION:-} ]]; then
MAJOR_VERSION=$(echo "$LM_PYTHON_VERSION" | cut -d'.' -f1)
switch_to python "$MAJOR_VERSION"
python --version
@@ -34,7 +35,6 @@ function debug_env() {
pwd
ls -alh
env | sort
- asdf list
asdf current
ruby -v
gem --version
@@ -46,11 +46,9 @@ function scan_project() {
gem install --quiet --silent "$LM_HOME/*.gem"
license_management ignored_groups add development
license_management ignored_groups add test
- options=("${prepare}" '--format=json' '--save=gl-license-management-report.json' "${LICENSE_FINDER_PYTHON_VERSION}" "${LICENSE_FINDER_CLI_OPTS}")
+ options=("${prepare}" '--format=json' "--save=${LM_REPORT_FILE}" "${LICENSE_FINDER_PYTHON_VERSION}" "${LICENSE_FINDER_CLI_OPTS}")
echo license_management report "${options[@]}"
license_management report "${options[@]}"
- bundle list
- cat gl-license-management-report.json
}
function prepare_javascript() {
@@ -58,12 +56,13 @@ function prepare_javascript() {
if [ -f package-lock.json ] && [ ! -f yarn.lock ] ; then
echo "Installing npm packages with npm ci"
npm ci
+ PREPARE="--no-prepare"
fi
if [ ! -d node_modules ]; then
echo "Installing yarn packages"
yarn install --ignore-engines --ignore-scripts
+ PREPARE="--no-prepare"
fi
- PREPARE="--no-prepare"
fi
}
diff --git a/spec/support/integration_test_helper.rb b/spec/support/integration_test_helper.rb
index b937f1b..737e988 100644
--- a/spec/support/integration_test_helper.rb
+++ b/spec/support/integration_test_helper.rb
@@ -8,7 +8,7 @@ module IntegrationTestHelper
end
def add_file(name, content = nil)
- full_path = Pathname.new("#{project_path}/#{name}")
+ full_path = Pathname.new(File.join(project_path, name))
FileUtils.mkdir_p(full_path.dirname)
IO.write(full_path, block_given? ? yield : content)
end