File tree Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Original file line number Diff line number Diff line change 89
89
fi
90
90
91
91
# Determine whether deploying will be possible.
92
- ciURL=$( mvn -q -Denforcer.skip=true -Dexec.executable=echo -Dexec.args=' ${project.ciManagement.url}' --non-recursive validate exec:exec 2> /dev/null)
93
- ciRepo=${ciURL##*/ }
94
- ciPrefix=${ciURL%/* }
95
- ciOrg=${ciPrefix##*/ }
96
92
deployOK=
97
- if [ " $TRAVIS_SECURE_ENV_VARS " != true ]
93
+ ciURL=$( mvn -q -Denforcer.skip=true -Dexec.executable=echo -Dexec.args=' ${project.ciManagement.url}' --non-recursive validate exec:exec 2>&1 )
94
+ if [ $? -ne 0 ]
98
95
then
99
- echo " No deploy -- secure environment variables not available"
100
- elif [ " $TRAVIS_PULL_REQUEST " != false ]
101
- then
102
- echo " No deploy -- pull request detected"
103
- elif [ " $TRAVIS_REPO_SLUG " != " $ciOrg /$ciRepo " ]
104
- then
105
- echo " No deploy -- repository fork: $TRAVIS_REPO_SLUG != $ciOrg /$ciRepo "
106
- # TODO: Detect travis-ci.org versus travis-ci.com?
96
+ echo " No deploy -- could not extract ciManagement URL"
97
+ echo " Output of failed attempt follows:"
98
+ echo " $ciURL "
107
99
else
108
- echo " All checks passed for artifact deployment"
109
- deployOK=1
100
+ ciRepo=${ciURL##*/ }
101
+ ciPrefix=${ciURL%/* }
102
+ ciOrg=${ciPrefix##*/ }
103
+ if [ " $TRAVIS_SECURE_ENV_VARS " != true ]
104
+ then
105
+ echo " No deploy -- secure environment variables not available"
106
+ elif [ " $TRAVIS_PULL_REQUEST " != false ]
107
+ then
108
+ echo " No deploy -- pull request detected"
109
+ elif [ " $TRAVIS_REPO_SLUG " != " $ciOrg /$ciRepo " ]
110
+ then
111
+ echo " No deploy -- repository fork: $TRAVIS_REPO_SLUG != $ciOrg /$ciRepo "
112
+ # TODO: Detect travis-ci.org versus travis-ci.com?
113
+ else
114
+ echo " All checks passed for artifact deployment"
115
+ deployOK=1
116
+ fi
110
117
fi
111
118
112
119
# Install GPG on OSX/macOS
You can’t perform that action at this time.
0 commit comments