summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
authorFabien Catteau <fcatteau@gitlab.com>2018-06-14 18:36:22 +0000
committerFabien Catteau <fcatteau@gitlab.com>2018-06-14 18:36:22 +0000
commit670a77f83573b859684a19392074267e1a1128c0 (patch)
treecb42f99f76906d6ae652dc0b0dfc1ad5256cbf59 /run.sh
parentae265f62905777bd9df4c6397399413794afb15e (diff)
parent2bf9bc8145a881b7b6e17423ab8dfccbfd138fc7 (diff)
Merge branch 'ensure-license-order' into 'master'
Ensure that license name order is consistent See merge request gitlab-org/security-products/license-management!4
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/run.sh b/run.sh
index e5433e2..6326f07 100755
--- a/run.sh
+++ b/run.sh
@@ -46,7 +46,7 @@ if [ "$COMMAND" = "analyse" ] ; then
COMMAND="analyze"
fi
-# "/test/test.sh" as a command means the user want the "test" command.
+# "/test/test.sh" as a command means the user want the "test" command.
if [ "$COMMAND" = "/test/test.sh" ] ; then
COMMAND="test"
fi
@@ -80,7 +80,7 @@ case "$COMMAND" in
APP_PATH=$1
shift
pushd $APP_PATH
-
+
# Before running license_finder, we need to install dependencies for the project.
if test -f Gemfile ; then
if test -n "$rvm_recommended_ruby" ; then
@@ -93,33 +93,33 @@ case "$COMMAND" in
# We need to install the license_finder gem into this Ruby version too.
gem install license_finder
fi
-
+
# Ignore test and development dependencies.
license_finder ignored_groups add development
license_finder ignored_groups add test
bundle install --without "development test"
fi
-
+
if test -f requirements.txt ; then
# Install Python Pip packages.
pip install -r requirements.txt
fi
-
+
if test -f package.json ; then
# Install NPM packages.
npm install --production
# Try to install Peer packages too, npm install doesn't do it anymore.
/node_modules/.bin/npm-install-peers
fi
-
+
if test -f bower.json ; then
# Install Bower packages.
bower install
fi
-
+
# Symlink the project into GOPATH to allow fetching dependencies.
- ln -s $APP_PATH /gopath/src/app
-
+ ln -sf `realpath $APP_PATH` /gopath/src/app
+
if test -f Godeps/Godeps.json ; then
# Install Go dependencies with Godeps.
pushd /gopath/src/app
@@ -131,22 +131,22 @@ case "$COMMAND" in
go get
popd
fi
-
+
if test -f pom.xml ; then
# Install Java Maven dependencies.
mvn install
fi
-
+
if test -f build.gradle ; then
# Install Java Gradle dependencies.
gradle build
fi
-
+
# Run License Finder.
echo "Running license_finder $@ in $PWD"
license_finder report --format=html --save=gl-license-management-report.html
popd
-
+
# Extract data from the HTML report and put it into a JSON file
node /html2json.js $APP_PATH/gl-license-management-report.html > $APP_PATH/gl-license-management-report.json
;;
@@ -156,4 +156,4 @@ case "$COMMAND" in
echo "Unknown command: $COMMAND"
echo "$usage"
exit 1
-esac
+esac