diff options
| author | Philippe Lafoucrière <plafoucriere@gitlab.com> | 2019-03-30 01:18:49 +0000 |
|---|---|---|
| committer | Philippe Lafoucrière <plafoucriere@gitlab.com> | 2019-03-30 01:18:49 +0000 |
| commit | a8f90f990cfe9f4df1b1d33eecd367e699a91a83 (patch) | |
| tree | af3a1d012da148b6d52ec8f83af04850cc9578b8 /run.sh | |
| parent | d9adaa8881c21362f19670e6e7cd7d653e8bc40d (diff) | |
Fix go support
closes https://gitlab.com/gitlab-org/gitlab-ee/issues/8708
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 43 |
1 files changed, 20 insertions, 23 deletions
@@ -101,11 +101,7 @@ case "$COMMAND" in 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 + skip_prepare=true fi if test -f package.json; then @@ -129,26 +125,20 @@ case "$COMMAND" in # Try to install Peer packages too, npm install doesn't do it anymore. /node_modules/.bin/npm-install-peers fi + skip_prepare=true fi - if test -f bower.json ; then - # Install Bower packages. - bower install - fi - # Symlink the project into GOPATH to allow fetching dependencies. - ln -sf `realpath $APP_PATH` /gopath/src/app - - if test -f Godeps/Godeps.json ; then - # Install Go dependencies with Godeps. - pushd /gopath/src/app > /dev/null - godep restore - popd > /dev/null - elif find . -name "*.go" -printf "found" -quit |grep found >/dev/null ; then - # Install Go dependencies with go get. - pushd /gopath/src/app > /dev/null - go get - popd > /dev/null + if find . -name "*.go" -printf "found" -quit |grep found >/dev/null ; then + if [ ! -f glide.lock -a ! -f vendor/manifest -a ! -f Gopkg.lock -a ! -f go.mod ]; then + echo "running go get" + # Only install deps if not using glide, govendor or dep + # Symlink the project into GOPATH to allow fetching dependencies. + ln -sf `realpath $APP_PATH` /gopath/src/app + pushd /gopath/src/app > /dev/null + go get || true + skip_prepare=true + fi fi if test -f pom.xml ; then @@ -159,6 +149,7 @@ case "$COMMAND" in JAVA_HOME=/usr/lib/jvm/oracle_jdk8 fi mvn install ${MAVEN_CLI_OPTS:--DskipTests} + skip_prepare=true fi if test -f build.gradle ; then @@ -168,15 +159,21 @@ case "$COMMAND" in JAVA_HOME=/usr/lib/jvm/oracle_jdk8 fi gradle build + skip_prepare=true fi else echo "Running '${SETUP_CMD[@]}' to install project dependencies..." ${SETUP_CMD[@]} + skip_prepare=true fi # Run License Finder. echo "Running license_finder $@ in $PWD" - license_finder report --format=html --save=gl-license-management-report.html + + if [ "$skip_prepare" != true ]; then + prepare="--prepare" + fi + license_finder report ${prepare} --format=html --save=gl-license-management-report.html # rvm removes trap in bash: https://github.com/rvm/rvm/issues/4416 declare -f restore_lockfile > /dev/null && restore_lockfile popd > /dev/null |
