Skip to content

Commit ed6bf4f

Browse files
author
Oren Novotny
authored
Merge pull request #420 from reactiveui/build-script
update build scripts
2 parents 08e9cbb + 5788ff2 commit ed6bf4f

File tree

11 files changed

+40
-63
lines changed

11 files changed

+40
-63
lines changed

.vsts-ci.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,21 @@ steps:
1313
modifyEnvironment: true
1414
displayName: Setup Environment Variables
1515

16-
- task: NuGetToolInstaller@0
17-
displayName: Use NuGet 4.6.2
16+
- task: DotNetCoreCLI@2
1817
inputs:
19-
versionSpec: 4.6.2
18+
command: custom
19+
custom: tool
20+
arguments: install --tool-path . nbgv
21+
displayName: Install NBGV tool
22+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
2023

21-
- task: DotNetCoreCLI@2
22-
inputs:
23-
command: build
24-
projects: script/setversion.csproj
25-
arguments: -c Release
24+
- script: nbgv cloud
2625
displayName: Set Version
27-
condition: eq(variables['system.pullrequest.isfork'], false)
26+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
2827

29-
- powershell: |
30-
nuget install SignClient -Version 0.9.1 -SolutionDir $(Build.SourcesDirectory) -Verbosity quiet -ExcludeVersion
31-
.\build.cmd
28+
- script: build.cmd
3229
displayName: Build
3330
env:
34-
SIGNCLIENT_SECRET: $(SignClientSecret)
35-
SIGNCLIENT_USER: $(SignClientUser)
3631
VSTS_ACCESS_TOKEN: $(System.AccessToken)
3732
COVERALLS_TOKEN: $(COVERALLS_TOKEN)
3833

@@ -41,26 +36,36 @@ steps:
4136
Contents: 'artifacts/*.nupkg'
4237
TargetFolder: '$(build.artifactstagingdirectory)\packages'
4338
flattenFolders: true
44-
condition: eq(variables['system.pullrequest.isfork'], false)
39+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
40+
41+
- task: PowerShell@2
42+
displayName: Authenticode Sign artifacts
43+
inputs:
44+
filePath: script/Sign-Packages.ps1
45+
env:
46+
SignClientUser: $(SignClientUser)
47+
SignClientSecret: $(SignClientSecret)
48+
ArtifactDirectory: $(Build.ArtifactStagingDirectory)\Packages
49+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), not(eq(variables['SignClientSecret'], '')))
4550

4651
- task: PublishBuildArtifacts@1
4752
displayName: Publish Package Artifacts
4853
inputs:
4954
pathToPublish: '$(build.artifactstagingdirectory)\packages'
5055
artifactType: container
5156
artifactName: Packages
52-
condition: eq(variables['system.pullrequest.isfork'], false)
57+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
5358

5459
- task: CopyFiles@2
5560
inputs:
5661
Contents: '**\bin\**'
5762
TargetFolder: '$(build.artifactstagingdirectory)\binaries'
58-
condition: eq(variables['system.pullrequest.isfork'], false)
63+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
5964

6065
- task: PublishBuildArtifacts@1
6166
displayName: Publish Binaries
6267
inputs:
6368
pathToPublish: '$(build.artifactstagingdirectory)\binaries'
6469
artifactType: container
6570
artifactName: Binaries
66-
condition: eq(variables['system.pullrequest.isfork'], false)
71+
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))

NuGet.Config

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Akavache: An Asynchronous Key-Value Store for Native Applications [![Build status](https://ci.appveyor.com/api/projects/status/4kret7d2wqtd47dk/branch/master?svg=true)](https://ci.appveyor.com/project/ghuntley/akavache/branch/master)
1+
## Akavache: An Asynchronous Key-Value Store for Native Applications [![Build Status](https://dotnetfoundation.visualstudio.com/ReactiveUI/_apis/build/status/Akavache-CI)](https://dotnetfoundation.visualstudio.com/ReactiveUI/_build/latest?definitionId=25)
22

33

44
Akavache is an *asynchronous*, *persistent* (i.e. writes to disk) key-value

build.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#tool "nuget:?package=OpenCover&version=4.6.519"
1717
#tool "nuget:?package=ReportGenerator&version=3.1.2"
1818
#tool "nuget:?package=vswhere&version=2.4.1"
19-
#tool "nuget:?package=xunit.runner.console&version=2.4.0-beta.2.build3984"
19+
#tool "nuget:?package=xunit.runner.console&version=2.4.0"
2020

2121

2222
//////////////////////////////////////////////////////////////////////
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
$currentDirectory = split-path $MyInvocation.MyCommand.Definition
22

33
# See if we have the ClientSecret available
4-
if([string]::IsNullOrWhitespace($env:SIGNCLIENT_SECRET)){
4+
if([string]::IsNullOrWhitespace($env:SignClientSecret)){
55
Write-Error "Client Secret not found, not signing packages";
66
[System.Environment]::Exit(1);
77
}
88

9+
dotnet tool install --tool-path . SignClient
10+
911
# Setup Variables we need to pass into the sign client tool
1012

1113
$appSettings = "$currentDirectory\SignPackages.json"
1214

13-
$appPath = "$currentDirectory\packages\SignClient\tools\netcoreapp2.0\SignClient.dll"
14-
15-
$nupgks = ls $currentDirectory\artifacts\*.nupkg | Select -ExpandProperty FullName
15+
$nupgks = gci $Env:ArtifactDirectory\*.nupkg | Select -ExpandProperty FullName
1616

1717
foreach ($nupkg in $nupgks){
1818
Write-Host "Submitting $nupkg for signing"
1919

20-
dotnet $appPath 'sign' -c $appSettings -i $nupkg -r $env:SIGNCLIENT_USER -s $env:SIGNCLIENT_SECRET -n 'ReactiveUI' -d 'ReactiveUI' -u 'https://reactiveui.net'
20+
.\SignClient 'sign' -c $appSettings -i $nupkg -r $env:SignClientUser -s $env:SignClientSecret -n 'ReactiveUI' -d 'ReactiveUI' -u 'https://reactiveui.net'
2121

2222
Write-Host "Finished signing $nupkg"
2323
}

script/setversion.csproj

Lines changed: 0 additions & 10 deletions
This file was deleted.

script/version.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Akavache.Tests/Akavache.Tests.csproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
1111
<PackageReference Include="Microsoft.Reactive.Testing" Version="4.0.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="xunit" Version="2.4.0-beta.2.build3984" />
16-
<PackageReference Include="xunit.runner.console" Version="2.4.0-beta.2.build3984" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0-beta.2.build3984" />
15+
<PackageReference Include="xunit" Version="2.4.0" />
16+
<PackageReference Include="xunit.runner.console" Version="2.4.0" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
1818
<PackageReference Include="Xunit.StaFact" Version="0.2.9" />
1919
<PackageReference Include="reactiveui" Version="8.5.1" />
2020
<PackageReference Include="ReactiveUI.Testing" Version="8.5.1" />
@@ -29,7 +29,4 @@
2929
<ProjectReference Include="..\Akavache.Sqlite3\Akavache.Sqlite3.csproj" />
3030
</ItemGroup>
3131

32-
<ItemGroup>
33-
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
34-
</ItemGroup>
3532
</Project>

src/Directory.build.props

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,22 @@
88
<Owners>paulcbetts</Owners>
99
<PackageTags>Akavache;Cache;Xamarin;Sqlite3;Magic</PackageTags>
1010
<PackageReleaseNotes>https://github.com/akavache/Akavache/releases</PackageReleaseNotes>
11-
1211
<NoWarn>$(NoWarn);1591</NoWarn>
13-
<RepositoryUrl>https://github.com/reactiveui/Akavache</RepositoryUrl>
14-
<RepositoryType>git</RepositoryType>
1512
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
1613

1714
<Platform>AnyCPU</Platform>
18-
<DebugType>full</DebugType>
1915
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
16+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
17+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
18+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
2019
</PropertyGroup>
2120

2221
<ItemGroup>
23-
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.23" PrivateAssets="all" />
22+
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.3" PrivateAssets="all" />
2423
</ItemGroup>
2524

2625
<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false'">
27-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
26+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
2827
</ItemGroup>
2928

3029
<PropertyGroup>

0 commit comments

Comments
 (0)