"Fossies" - the Fresh Open Source Software Archive

Member "psi-probe-psi-probe-3.4.2/travis/after_success.sh" (21 Nov 2019, 2629 Bytes) of package /linux/www/psi-probe-3.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "after_success.sh": 3.3.1_vs_3.4.2.

    1 #!/bin/bash
    2 #
    3 # Licensed under the GPL License. You may not use this file except in compliance with the License.
    4 # You may obtain a copy of the License at
    5 #
    6 #   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    7 #
    8 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
    9 # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
   10 # PURPOSE.
   11 #
   12 
   13 # Get Commit Message
   14 commit_message=$(git log --format=%B -n 1)
   15 echo "Current commit detected: ${commit_message}"
   16 
   17 # We build for several JDKs on Travis.
   18 # Some actions, like analyzing the code (Coveralls) and uploading
   19 # artifacts on a Maven repository, should only be made for one version.
   20  
   21 # If the version is 1.8, then perform the following actions.
   22 # 1. Upload artifacts to Sonatype.
   23 #    a. Use -q option to only display Maven errors and warnings.
   24 #    b. Use --settings to force the usage of our "settings.xml" file.
   25 # 2. Notify Coveralls.
   26 # 3. Deploy site
   27 #    a. Use -q option to only display Maven errors and warnings.
   28 
   29 if [ $TRAVIS_REPO_SLUG == "psi-probe/psi-probe" ] && [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_BRANCH == "master" ] && [[ "$commit_message" != *"[maven-release-plugin]"* ]]; then
   30 
   31   if [ $TRAVIS_JDK_VERSION == "openjdk8" ]; then
   32     # Deploy sonatype
   33     ./mvnw deploy -q --settings ./travis/settings.xml
   34     echo -e "Successfully deployed SNAPSHOT artifacts to Sonatype under Travis job ${TRAVIS_JOB_NUMBER}"
   35 
   36     # Send coverage to coveralls
   37     ./mvnw test jacoco:report coveralls:report -q --settings ./travis/settings.xml
   38     echo -e "Successfully ran coveralls under Travis job ${TRAVIS_JOB_NUMBER}"
   39 
   40     # the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
   41     ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=psi-probe_psi-probe -q --settings ./travis/settings.xml
   42     echo -e "Successfully ran sonarcloud under Travis job ${TRAVIS_JOB_NUMBER}"
   43 
   44     # Deploy to site
   45     # Cannot currently run site this way
   46     # ./mvnw site site:deploy -q --settings ./travis/settings.xml
   47     # echo -e "Successfully deploy site under Travis job ${TRAVIS_JOB_NUMBER}"
   48   fi
   49 
   50 elif [ $TRAVIS_REPO_SLUG == "psi-probe/psi-probe" ] && [ $TRAVIS_PULL_REQUEST != "false" ]; then
   51 
   52   if [ $TRAVIS_JDK_VERSION == "openjdk8" ]; then
   53     # Send coverage to coveralls
   54     ./mvnw clean test jacoco:report coveralls:report -q --settings ./travis/settings.xml
   55     echo -e "Successfully ran coveralls under Travis job ${TRAVIS_JOB_NUMBER}"
   56   fi
   57 
   58 else
   59   echo "Travis build skipped"
   60 fi