@@ -45,7 +45,6 @@ release::usage() {
45
45
Works only when on a branch, not when checked out directly.
46
46
--log <log-file> Write full log to <log-file>, only print progress to screen
47
47
--skip-tests Do not run tests
48
- --keep-staging-repo Do not drop the staging repo (for manual review of what has been uploaded on a dry run)
49
48
--no-strict-checksums Do not insist on strict checksum policy for downloaded Maven artifacts
50
49
-q --quiet Adds quiet option to Maven options - only show errors
51
50
EOT
55
54
release::run () {
56
55
source " $( basedir) /commands/util/git_funcs"
57
56
source " $( basedir) /commands/util/version_funcs"
58
- source " $( basedir) /commands/util/maven_central_funcs"
59
57
60
58
# Main application directory
61
59
local working_dir=$( appdir)
@@ -101,10 +99,6 @@ release::run() {
101
99
102
100
# For a test run, we are done
103
101
if [ $( hasflag --dry-run -n) ]; then
104
- if [ ! $( hasflag --snapshot-release) ] && [ ! $( hasflag --local-release) ] && [ ! $( hasflag --keep-staging-repo) ]; then
105
- drop_staging_repo " $working_dir " " $maven_opts "
106
- fi
107
-
108
102
echo " ==== Dry run finished, nothing has been committed"
109
103
echo " ==== Use 'git reset --hard' to cleanup"
110
104
exit 0
@@ -115,10 +109,6 @@ release::run() {
115
109
# --------------------------
116
110
117
111
if [ ! $( hasflag --local-release) ] && [ ! $( hasflag --snapshot-release) ]; then
118
- # Release staging repo
119
- # NOTE: not working recently (because of timeouts) - fallback to doing this manually
120
- # release_staging_repo "$working_dir" "$maven_opts"
121
-
122
112
# Push everything (if configured)
123
113
git_push " $working_dir " " $release_version "
124
114
@@ -165,9 +155,12 @@ build_and_stage_artifacts() {
165
155
elif [ $( hasflag --snapshot-release) ]; then
166
156
echo " ==== Release snapshot to local"
167
157
./mvnw ${maven_opts} install -pl ' !:citrus-remote-sample'
158
+ elif [ $( hasflag --dry-run -n) ]; then
159
+ echo " ==== Release to Maven Central - dry run"
160
+ ./mvnw ${maven_opts} install deploy -pl ' !:citrus-remote-sample' -Dsurefire.failIfNoSpecifiedTests=false -Dfailsafe.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dtest -Dit.test -Dgpg.autosign=true -Prelease-central
168
161
else
169
- echo " ==== Release to Maven central and stage artifacts to Sonatype "
170
- ./mvnw ${maven_opts} install deploy -pl ' !:citrus-remote-sample' -DfailIfNoTests=false -Dtest -Dit.test -Prelease-central -DstagingDescription= " Staging Citrus Remote for v $release_version "
162
+ echo " ==== Release to Maven central"
163
+ ./mvnw ${maven_opts} install deploy -pl ' !:citrus-remote-sample' -Dsurefire.failIfNoSpecifiedTests=false -Dfailsafe.failIfNoSpecifiedTests=false - DfailIfNoTests=false -Dtest -Dit.test -Dgpg.autosign=true -DautoPublish=true -Prelease-central
171
164
fi
172
165
}
173
166
@@ -198,7 +191,7 @@ extract_maven_opts() {
198
191
199
192
if [ $( hasflag --skip-tests) ]; then
200
193
# Do not run any tests but compile test sources
201
- maven_opts=" $maven_opts -Dtest -Dit.test -DfailIfNoTests=false"
194
+ maven_opts=" $maven_opts -Dtest -Dit.test -Dsurefire.failIfNoSpecifiedTests=false -Dfailsafe.failIfNoSpecifiedTests=false - DfailIfNoTests=false"
202
195
fi
203
196
204
197
if [ ! $( hasflag --no-strict-checksums) ]; then
0 commit comments