@@ -65,7 +65,7 @@ if [ -f pom.xml ]; then
6565 # --== MAVEN SETUP ==--
6666
6767 echo
68- echo " == Configuring Maven =="
68+ echo ' == Configuring Maven =='
6969
7070 # NB: Suppress "Downloading/Downloaded" messages.
7171 # See: https://stackoverflow.com/a/35653426/1207769
@@ -76,12 +76,12 @@ if [ -f pom.xml ]; then
7676 settingsFile=" $HOME /.m2/settings.xml"
7777 customSettings=.ci/settings.xml
7878 if [ " $OSSRH_USER " -o " $OSSRH_PASS " ]; then
79- echo " [WARNING] Obsolete OSSRH vars detected. Secrets may need updating to deploy to Maven Central."
79+ echo ' [WARNING] Obsolete OSSRH vars detected. Secrets may need updating to deploy to Maven Central.'
8080 fi
8181 if [ -f " $customSettings " ]; then
8282 cp " $customSettings " " $settingsFile "
8383 elif [ -z " $BUILD_REPOSITORY " ]; then
84- echo " Skipping settings.xml generation (no BUILD_REPOSITORY; assuming we are running locally)"
84+ echo ' Skipping settings.xml generation (no BUILD_REPOSITORY; assuming we are running locally)'
8585 else
8686 # settings.xml header
8787 cat > " $settingsFile " << EOL
103103 </server>
104104EOL
105105 else
106- echo " [WARNING] Skipping settings.xml scijava servers (no MAVEN deployment credentials)."
106+ echo ' [WARNING] Skipping settings.xml scijava servers (no MAVEN deployment credentials).'
107107 fi
108108 # settings.xml central server
109109 if [ " $CENTRAL_USER " -a " $CENTRAL_PASS " ]; then
115115 </server>
116116EOL
117117 else
118- echo " [WARNING] Skipping settings.xml central server (no CENTRAL deployment credentials)."
118+ echo ' [WARNING] Skipping settings.xml central server (no CENTRAL deployment credentials).'
119119 fi
120120 cat >> " $settingsFile " << EOL
121121 </servers>
139139 </profiles>
140140EOL
141141 else
142- echo " [WARNING] Skipping settings.xml gpg profile (no GPG credentials)."
142+ echo ' [WARNING] Skipping settings.xml gpg profile (no GPG credentials).'
143143 fi
144144 # settings.xml footer
145145 cat >> " $settingsFile " << EOL
@@ -150,21 +150,21 @@ EOL
150150 # --== DEPLOYMENT CHECKS ==--
151151
152152 # Determine whether deploying is both possible and warranted.
153- echo " Performing deployment checks"
153+ echo ' Performing deployment checks'
154154 deployOK=
155155
156156 scmURL=$( mavenEvaluate ' ${project.scm.url}' )
157157 result=$?
158158 checkSuccess $result
159159 if [ $result -ne 0 ]; then
160- echo " No deploy -- could not extract ciManagement URL"
161- echo " Output of failed attempt follows:"
160+ echo ' No deploy -- could not extract ciManagement URL'
161+ echo ' Output of failed attempt follows:'
162162 echo " $scmURL "
163163 else
164164 scmURL=${scmURL% .git}
165165 scmURL=${scmURL%/ }
166166 if [ " $NO_DEPLOY " ]; then
167- echo " No deploy -- the NO_DEPLOY flag is set"
167+ echo ' No deploy -- the NO_DEPLOY flag is set'
168168 elif [ " $BUILD_REPOSITORY " -a " $BUILD_REPOSITORY " != " $scmURL " ]; then
169169 echo " No deploy -- repository fork: $BUILD_REPOSITORY != $scmURL "
170170 elif [ " $BUILD_BASE_REF " -o " $BUILD_HEAD_REF " ]; then
@@ -175,31 +175,31 @@ EOL
175175 result=$?
176176 checkSuccess $result
177177 if [ $result -ne 0 ]; then
178- echo " No deploy -- could not extract version string"
179- echo " Output of failed attempt follows:"
178+ echo ' No deploy -- could not extract version string'
179+ echo ' Output of failed attempt follows:'
180180 echo " $version "
181181 else
182182 case " $version " in
183183 * -SNAPSHOT)
184184 # Snapshot version -- ensure release.properties not present.
185185 if [ -f release.properties ]; then
186- echo " [ERROR] Spurious release.properties file is present"
187- echo " Remove the file from version control and try again."
186+ echo ' [ERROR] Spurious release.properties file is present'
187+ echo ' Remove the file from version control and try again.'
188188 exit 1
189189 fi
190190
191191 # Check for SciJava Maven repository credentials.
192192 if [ " $MAVEN_USER " -a " $MAVEN_PASS " ]; then
193193 deployOK=1
194194 else
195- echo " No deploy -- MAVEN environment variables not available"
195+ echo ' No deploy -- MAVEN environment variables not available'
196196 fi
197197 ;;
198198 * )
199199 # Release version -- ensure release.properties is present.
200200 if [ ! -f release.properties ]; then
201- echo " [ERROR] Release version, but release.properties not found"
202- echo " You must use release-version.sh to release -- see https://imagej.net/develop/releasing"
201+ echo ' [ERROR] Release version, but release.properties not found'
202+ echo ' You must use release-version.sh to release -- see https://imagej.net/develop/releasing'
203203 exit 1
204204 fi
205205
208208 result=$?
209209 checkSuccess $result
210210 if [ $result -ne 0 ]; then
211- echo " No deploy -- could not extract releaseProfiles string"
212- echo " Output of failed attempt follows:"
211+ echo ' No deploy -- could not extract releaseProfiles string'
212+ echo ' Output of failed attempt follows:'
213213 echo " $releaseProfiles "
214214 fi
215215 case " $releaseProfiles " in
218218 if [ " $MAVEN_USER " -a " $MAVEN_PASS " ]; then
219219 deployOK=1
220220 else
221- echo " [ERROR] Cannot deploy: MAVEN environment variables not available"
221+ echo ' [ERROR] Cannot deploy: MAVEN environment variables not available'
222222 exit 1
223223 fi
224224 ;;
@@ -228,12 +228,12 @@ EOL
228228 if [ " $CENTRAL_USER " -a " $CENTRAL_PASS " -a " $SIGNING_ASC " -a " $GPG_KEY_NAME " -a " $GPG_PASSPHRASE " ]; then
229229 deployOK=1
230230 else
231- echo " [ERROR] Cannot deploy: CENTRAL environment variables not available"
231+ echo ' [ERROR] Cannot deploy: CENTRAL environment variables not available'
232232 exit 1
233233 fi
234234 ;;
235235 * )
236- echo " Unknown deploy target -- attempting to deploy anyway"
236+ echo ' Unknown deploy target -- attempting to deploy anyway'
237237 deployOK=1
238238 ;;
239239 esac
243243 fi
244244 fi
245245 if [ " $deployOK " ]; then
246- echo " All checks passed for artifact deployment"
246+ echo ' All checks passed for artifact deployment'
247247 fi
248248
249249 # --== Maven build arguments ==--
264264 # Import the GPG signing key.
265265 keyFile=.ci/signingkey.asc
266266 if [ " $deployOK " ]; then
267- echo " == Importing GPG keypair =="
267+ echo ' == Importing GPG keypair =='
268268 mkdir -p .ci
269269 echo " $SIGNING_ASC " > " $keyFile "
270270 ls -la " $keyFile "
@@ -297,23 +297,23 @@ EOL
297297 fi
298298 fi
299299 else
300- echo " [WARNING] Skipping gpg setup (no GPG credentials)."
300+ echo ' [WARNING] Skipping gpg setup (no GPG credentials).'
301301 fi
302302
303303 # --== BUILD EXECUTION ==--
304304
305305 # Run the build.
306306 if [ " $deployOK " -a -f release.properties ]; then
307307 echo
308- echo " == Cutting and deploying release version =="
308+ echo ' == Cutting and deploying release version =='
309309 BUILD_ARGS=" $BUILD_ARGS release:perform"
310310 elif [ " $deployOK " ]; then
311311 echo
312- echo " == Building and deploying main branch SNAPSHOT =="
312+ echo ' == Building and deploying main branch SNAPSHOT =='
313313 BUILD_ARGS=" -Pdeploy-to-scijava $BUILD_ARGS deploy"
314314 else
315315 echo
316- echo " == Building the artifact locally only =="
316+ echo ' == Building the artifact locally only =='
317317 BUILD_ARGS=" $BUILD_ARGS install javadoc:javadoc"
318318 fi
319319 # Check the build result.
0 commit comments