浏览代码

improve travis scripts

Julius Pfrommer 7 年之前
父节点
当前提交
a092e67f93
共有 2 个文件被更改,包括 8 次插入12 次删除
  1. 7 11
      tools/travis/travis_linux_after_success.sh
  2. 1 1
      tools/travis/travis_push_release.sh

+ 7 - 11
tools/travis/travis_linux_after_success.sh

@@ -1,17 +1,13 @@
 #!/bin/bash
 set -ev
 
-if [ $ANALYZE = "true" ]; then
-    echo "=== Skipping after_success scripts in ANALYZE mode ==="
-else
+if [ "$ANALYZE" = "false" ] && [ "$CC" = "gcc" ] && [ "${TRAVIS_REPO_SLUG}" = "open62541/open62541" ]; then
     echo "=== Executing after_success scripts ==="
-    if [ "$CC" = "gcc" ] && [ "${TRAVIS_REPO_SLUG}" = "open62541/open62541" ]; then
-        if [ ${TRAVIS_PULL_REQUEST} == "false" ] && [ ${TRAVIS_BRANCH} = "0.2" ]; then
-            sh ./tools/travis/travis_push_doc.sh
-            sh ./tools/travis/travis_push_coverity.sh
-        fi
-        sh ./tools/travis/travis_push_release.sh;
-    else
-        echo "  Skipping push scripts since not gcc and/or ${TRAVIS_REPO_SLUG} is not the main repo"
+    if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "0.2" ]; then
+        sh ./tools/travis/travis_push_doc.sh
+        sh ./tools/travis/travis_push_coverity.sh
     fi
+    sh ./tools/travis/travis_push_release.sh;
+else
+    echo "=== Not in the main repository or not the main build; Skip release scripts ==="
 fi

+ 1 - 1
tools/travis/travis_push_release.sh

@@ -10,7 +10,6 @@ COMMENT="$(git log --pretty=format:"%s" --date=iso --abbrev=10 --all -1)"
 git clone --depth=5 -b gh-pages https://$GITAUTH@github.com/open62541/open62541-www
 cd open62541-www
 
-#hanndle releases
 cd releases
 if [ ! -e "$TAG.zip" ]; then
     #add the first line
@@ -48,5 +47,6 @@ git config --global user.name "Open62541 travis-ci"
 git config --global push.default simple
 git commit -am "added release files and updated releases webpage by travis-ci [ci skip]"
 git push https://$GITAUTH@github.com/open62541/open62541-www
+
 cd ..
 rm -rf open62541-www