Quellcode durchsuchen

adjusting conditional deploy

jhonnymertz vor 6 Jahren
Ursprung
Commit
3f7959f5be
1 geänderte Dateien mit 6 neuen und 15 gelöschten Zeilen
  1. 6 15
      deploy/publish.sh

+ 6 - 15
deploy/publish.sh

@@ -1,19 +1,10 @@
 #!/bin/bash
 
-if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) &&
-    [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
-  echo "This will deploy!"
+if [ ! -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
+  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 $?
 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
-    #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 $?
+  echo "This will not deploy because its not a release!"
 fi