diff --git a/.travis/setup-secrets.sh b/.travis/setup-secrets.sh index 19344e7d8e..c49ba0f81f 100755 --- a/.travis/setup-secrets.sh +++ b/.travis/setup-secrets.sh @@ -18,8 +18,17 @@ mkdir -p "$HOME/.ssh" chmod 700 "$HOME/.ssh" mv .travis/id_rsa "$HOME/.ssh/id_rsa" chmod 600 "$HOME/.ssh/id_rsa" -mkdir -p "$HOME/.gpg" -gpg --batch --import .travis/release-signing-key-82DE7BE82166E84E.gpg + +if travis_isLinux; then + mkdir -p "$HOME/.gpg" + gpg --batch --import .travis/release-signing-key-82DE7BE82166E84E.gpg +else + log_info "Not setting up gpg for ${TRAVIS_OS_NAME}." + # Note: importing keys into gpg will start gpg-agent. This background task then + # prevents travis-ci from terminating the build job under Windows. + # Alternatively "gpgconf --kill gpg-agent" can be executed to stop the + # gpg-agent at the end, if the gpg keys are needed. +fi rm .travis/secrets.tar rm .travis/release-signing-key-82DE7BE82166E84E.gpg