File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11# !/usr/bin/env pwsh
2- Import-Module " $PSScriptRoot /SetupAnt.psd1"
2+ using namespace Belin.SetupAnt
3+ Add-Type - Path " $PSScriptRoot /bin/Belin.SetupAnt.dll"
34
45$ErrorActionPreference = " Stop"
56$PSNativeCommandUseErrorActionPreference = $true
67Set-StrictMode - Version Latest
78if (-not (Test-Path Env:SETUP_ANT_VERSION)) { $Env: SETUP_ANT_VERSION = " Latest" }
89
10+ $release = [Release ]::Find($Env: SETUP_ANT_VERSION )
11+ if (-not $release ) { throw " No release matches the specified version constraint." }
12+
913$optionalTasks = $Env: SETUP_ANT_OPTIONAL_TASKS -eq " true"
10- $path = Install-Release $Env: SETUP_ANT_VERSION - OptionalTasks:$optionalTasks
14+ $path = [Setup ]::new($release ).Install($optionalTasks )
15+
1116$installed = $optionalTasks ? " installed with optional tasks" : " installed"
1217" Apache Ant $ ( $release.Version ) successfully $installed in "" $path "" ."
Original file line number Diff line number Diff line change 11namespace Belin . SetupAnt . Cmdlets ;
22
3- using System . Data ;
4- using System . Text . RegularExpressions ;
5-
63/// <summary>
74/// Gets the release corresponding to the specified version.
85/// </summary>
You can’t perform that action at this time.
0 commit comments