|
1 | | -using System; |
| 1 | +using System; |
2 | 2 | using System.Collections.Generic; |
3 | 3 | using System.Diagnostics; |
4 | 4 | using System.Linq; |
@@ -218,8 +218,6 @@ ICredentialsManager credentialsManager |
218 | 218 | $"{newLine}**This challenge type will be selected for all identifiers.**"); |
219 | 219 | } |
220 | 220 | } |
221 | | - |
222 | | - challengeInfo.AppendLine($"{newLine}---{newLine}"); |
223 | 221 | } |
224 | 222 |
|
225 | 223 | steps.Add(new ActionStep |
@@ -281,51 +279,59 @@ ICredentialsManager credentialsManager |
281 | 279 | { |
282 | 280 | // deploying to single or multiple Site |
283 | 281 |
|
284 | | - if (item.RequestConfig.DeploymentBindingMatchHostname) |
| 282 | + if (serverProvider == null) |
285 | 283 | { |
286 | | - deploymentDescription.AppendLine( |
287 | | - "* Deploy to hostname bindings matching certificate domains."); |
| 284 | + deploymentDescription.AppendLine($"* Target instance has no supported targets for auto-deployment (e.g. IIS). Deployment Tasks may still apply."); |
288 | 285 | } |
289 | | - |
290 | | - if (item.RequestConfig.DeploymentBindingBlankHostname) |
| 286 | + else |
291 | 287 | { |
292 | | - deploymentDescription.AppendLine("* Deploy to bindings with blank hostname."); |
293 | | - } |
294 | 288 |
|
295 | | - if (item.RequestConfig.DeploymentBindingReplacePrevious) |
296 | | - { |
297 | | - deploymentDescription.AppendLine("* Deploy to bindings with previous certificate."); |
298 | | - } |
| 289 | + if (item.RequestConfig.DeploymentBindingMatchHostname) |
| 290 | + { |
| 291 | + deploymentDescription.AppendLine( |
| 292 | + "* Deploy to hostname bindings matching certificate domains."); |
| 293 | + } |
299 | 294 |
|
300 | | - if (item.RequestConfig.DeploymentBindingOption == DeploymentBindingOption.AddOrUpdate) |
301 | | - { |
302 | | - deploymentDescription.AppendLine("* Add or Update https bindings as required"); |
303 | | - } |
| 295 | + if (item.RequestConfig.DeploymentBindingBlankHostname) |
| 296 | + { |
| 297 | + deploymentDescription.AppendLine("* Deploy to bindings with blank hostname."); |
| 298 | + } |
304 | 299 |
|
305 | | - if (item.RequestConfig.DeploymentBindingOption == DeploymentBindingOption.UpdateOnly) |
306 | | - { |
307 | | - deploymentDescription.AppendLine("* Update https bindings as required (no auto-created https bindings)"); |
308 | | - } |
| 300 | + if (item.RequestConfig.DeploymentBindingReplacePrevious) |
| 301 | + { |
| 302 | + deploymentDescription.AppendLine("* Deploy to bindings with previous certificate."); |
| 303 | + } |
309 | 304 |
|
310 | | - if (item.RequestConfig.DeploymentSiteOption == DeploymentOption.SingleSite) |
311 | | - { |
312 | | - if (!string.IsNullOrEmpty(item.ServerSiteId)) |
| 305 | + if (item.RequestConfig.DeploymentBindingOption == DeploymentBindingOption.AddOrUpdate) |
313 | 306 | { |
314 | | - try |
315 | | - { |
316 | | - var siteInfo = await serverProvider.GetSiteById(item.ServerSiteId); |
317 | | - deploymentDescription.AppendLine($"## Deploying to Site" + newLine + newLine + |
318 | | - $"`{siteInfo.Name}`" + newLine); |
319 | | - } |
320 | | - catch (Exception exp) |
| 307 | + deploymentDescription.AppendLine("* Add or Update https bindings as required"); |
| 308 | + } |
| 309 | + |
| 310 | + if (item.RequestConfig.DeploymentBindingOption == DeploymentBindingOption.UpdateOnly) |
| 311 | + { |
| 312 | + deploymentDescription.AppendLine("* Update https bindings as required (no auto-created https bindings)"); |
| 313 | + } |
| 314 | + |
| 315 | + if (item.RequestConfig.DeploymentSiteOption == DeploymentOption.SingleSite) |
| 316 | + { |
| 317 | + if (!string.IsNullOrEmpty(item.ServerSiteId)) |
321 | 318 | { |
322 | | - deploymentDescription.AppendLine($"Error: **cannot identify selected site.** {exp.Message} "); |
| 319 | + try |
| 320 | + { |
| 321 | + var siteInfo = await serverProvider.GetSiteById(item.ServerSiteId); |
| 322 | + deploymentDescription.AppendLine($"## Deploying to Site" + newLine + newLine + |
| 323 | + $"`{siteInfo.Name}`" + newLine); |
| 324 | + } |
| 325 | + catch (Exception exp) |
| 326 | + { |
| 327 | + deploymentDescription.AppendLine($"Error: **cannot identify selected site.** {exp.Message} "); |
| 328 | + } |
323 | 329 | } |
324 | 330 | } |
325 | | - } |
326 | | - else |
327 | | - { |
328 | | - deploymentDescription.AppendLine($"## Deploying to all matching sites:"); |
| 331 | + else |
| 332 | + { |
| 333 | + deploymentDescription.AppendLine($"## Deploying to all matching sites:"); |
| 334 | + } |
329 | 335 | } |
330 | 336 |
|
331 | 337 | // add deployment sub-steps (if any) |
@@ -366,7 +372,7 @@ ICredentialsManager credentialsManager |
366 | 372 | } |
367 | 373 | else if (item.RequestConfig.DeploymentSiteOption == DeploymentOption.NoDeployment) |
368 | 374 | { |
369 | | - deploymentDescription.AppendLine("* The certificate will be saved to local disk only."); |
| 375 | + deploymentDescription.AppendLine("* The certificate will be saved to local storage."); |
370 | 376 | } |
371 | 377 |
|
372 | 378 | deploymentStep.Description = deploymentDescription.ToString(); |
|
0 commit comments