File tree Expand file tree Collapse file tree 8 files changed +16
-19
lines changed Expand file tree Collapse file tree 8 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 18
18
source : current
19
19
path : $(Build.SourcesDirectory)
20
20
artifact : storage
21
- - pwsh : dotnet cake build.cake --bootstrap; dotnet cake build.cake -- target= Artifacts-Test --docker_distro= $(DISTRO) --docker_dotnetversion= $(DOTNET_VERSION)
21
+ - pwsh : ./ build.ps1 - target Artifacts-Test -DockerDistro $(DISTRO) -DockerDotnetVersion $(DOTNET_VERSION)
22
22
displayName : ' [Docker Test Artifacts]'
Original file line number Diff line number Diff line change 6
6
inputs :
7
7
versionSpec : ' >= 2.5'
8
8
addToPath : true
9
- - pwsh : dotnet cake build.cake --bootstrap; dotnet cake build.cake -- target= Pack
9
+ - pwsh : ./ build.ps1 - target Pack
10
10
displayName : ' [Cake build & pack]'
11
11
- publish : $(System.DefaultWorkingDirectory)
12
12
displayName : ' Upload pipeline artifacts'
Original file line number Diff line number Diff line change 4
4
key : ' tools | "$(Agent.OS)" | build.cake'
5
5
path : tools
6
6
displayName : Cache Cake tools
7
- - task : UseDotNet@2
8
- displayName : ' Use .NET Core sdk 3.1'
7
+ - task : Cache@2
9
8
inputs :
10
- packageType : sdk
11
- version : 3.1.101
12
- - pwsh : dotnet tool restore
13
- displayName : ' Install Cake tool'
9
+ key : ' dotnet | "$(Agent.OS)" | build.config'
10
+ path : .dotnet
11
+ displayName : Cache dotnet locally
Original file line number Diff line number Diff line change 18
18
source : current
19
19
path : $(Build.SourcesDirectory)
20
20
artifact : storage
21
- - pwsh : dotnet cake build.cake --bootstrap; dotnet cake build.cake -- target= Publish-DockerHub --docker_distro= $(DISTRO) --docker_dotnetversion= $(DOTNET_VERSION)
21
+ - pwsh : ./ build.ps1 - target Publish-DockerHub -DockerDistro $(DISTRO) -DockerDotnetVersion $(DOTNET_VERSION)
22
22
displayName : ' [Docker build]'
23
23
env :
24
24
DOCKER_USERNAME : $(DOCKER_USERNAME)
Original file line number Diff line number Diff line change 15
15
source : current
16
16
path : $(Build.SourcesDirectory)
17
17
artifact : storage
18
- - pwsh : dotnet cake build.cake --bootstrap; dotnet cake build.cake -- target= Publish-${{ parameters.taskName }}
18
+ - pwsh : ./ build.ps1 - target Publish-${{ parameters.taskName }}
19
19
displayName : ' [Publish]'
20
20
env :
21
21
GITHUB_TOKEN : $(GITHUB_TOKEN)
Original file line number Diff line number Diff line change 6
6
source : current
7
7
path : $(Build.SourcesDirectory)
8
8
artifact : storage
9
- - pwsh : dotnet cake build.cake --bootstrap; dotnet cake build.cake -- target= Release
9
+ - pwsh : ./ build.ps1 - target Release
10
10
displayName : ' [Release]'
11
11
env :
12
12
GITHUB_TOKEN : $(GITHUB_TOKEN)
Original file line number Diff line number Diff line change 1
1
steps :
2
2
- template : common-steps.yml
3
- - task : UseDotNet@2
4
- displayName : ' Use .NET Core sdk 2.1'
5
- inputs :
6
- packageType : sdk
7
- version : 2.1.803
8
3
- task : CmdLine@2
9
4
condition : eq( variables['Agent.OS'], 'Darwin' )
10
5
displayName : ' Use mono'
17
12
echo "##vso[task.setvariable variable=PATH;]$MONOPREFIX/bin:$PATH"
18
13
sudo rm /Library/Frameworks/Mono.framework/Versions/Current
19
14
sudo ln -s $MONOPREFIX /Library/Frameworks/Mono.framework/Versions/Current
20
- - pwsh : dotnet cake build.cake --bootstrap; dotnet cake build.cake -- target= Test
15
+ - pwsh : ./ build.ps1 - target Test
21
16
displayName : ' [Run Test]'
22
17
env :
23
18
ENABLED_UNIT_TESTS : $(ENABLED_UNIT_TESTS)
Original file line number Diff line number Diff line change @@ -119,13 +119,17 @@ Function Install-Dotnet($DotNetVersion)
119
119
{
120
120
if ($IsMacOS -or $IsLinux ) {
121
121
$ScriptPath = Join-Path $InstallPath ' dotnet-install.sh'
122
- (New-Object System.Net.WebClient).DownloadFile($DotNetUnixInstallerUri , $ScriptPath );
122
+ if (! (Test-Path $ScriptPath )) {
123
+ (New-Object System.Net.WebClient).DownloadFile($DotNetUnixInstallerUri , $ScriptPath );
124
+ }
123
125
124
126
& bash $ScriptPath -- version " $DotNetVersion " -- install-dir " $InstallPath " -- channel " $DotNetChannel " -- no- path
125
127
}
126
128
else {
127
129
$ScriptPath = Join-Path $InstallPath ' dotnet-install.ps1'
128
- (New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri , $ScriptPath );
130
+ if (! (Test-Path $ScriptPath )) {
131
+ (New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri , $ScriptPath );
132
+ }
129
133
130
134
& $ScriptPath - Channel $DotNetChannel - Version $DotNetVersion - InstallDir $InstallPath ;
131
135
}
You can’t perform that action at this time.
0 commit comments