Browse Source

testing travis-ci variables

jhonnymertz 6 years ago
parent
commit
9de5af7163
2 changed files with 14 additions and 5 deletions
  1. 0 4
      .travis.yml
  2. 14 1
      deploy/publish.sh

+ 0 - 4
.travis.yml

@@ -6,10 +6,6 @@ cache:
   directories:
   - "$HOME/.m2"
 after_success:
-- openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/pubring.gpg.enc
-  -out $GPG_DIR/pubring.gpg -d
-- openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/secring.gpg.enc
-  -out $GPG_DIR/secring.gpg -d
 - "$GPG_DIR/publish.sh"
 env:
   global:

+ 14 - 1
deploy/publish.sh

@@ -1,6 +1,19 @@
 #!/bin/bash
 
+if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) &&
+    [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
+  echo "This will deploy!"
+else
+  echo "This will not deploy!"
+fi
+
+echo "$TRAVIS_BRANCH"
+echo "$TRAVIS_PULL_REQUEST"
+echo "$TRAVIS_TAG"
+
 if [[ ($TRAVIS_PULL_REQUEST == "false") && ($TRAVIS_BRANCH == "master") ]]; then
-    mvn deploy --settings $GPG_DIR/settings.xml -DperformRelease=true -DskipTests=true
+    #openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/pubring.gpg.enc -out $GPG_DIR/pubring.gpg -d
+    #openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/secring.gpg.enc -out $GPG_DIR/secring.gpg -d
+    #mvn deploy --settings $GPG_DIR/settings.xml -DperformRelease=true -DskipTests=true
     exit $?
 fi