-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathappveyor.yml
More file actions
56 lines (48 loc) · 2.46 KB
/
appveyor.yml
File metadata and controls
56 lines (48 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
image: Visual Studio 2022
configuration: Release
platform: Any CPU
skip_tags: true
install:
# Install .NET 10 SDK (adjust version if needed)
- ps: |
Write-Host "Installing .NET 10 SDK..."
$dotnetInstallScript = "$env:temp\dotnet-install.ps1"
Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile $dotnetInstallScript
& $dotnetInstallScript -Channel 10.0 -InstallDir "C:\Program Files\dotnet" -NoPath
dotnet --info
- ps: $env:version_file_path = ".\version.props"
- ps: gitversion /output buildserver
- ps: $env:major_version = (Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/MajorVersion" | Select-Object -ExpandProperty Node).InnerText
- ps: $env:minor_version = (Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/MinorVersion" | Select-Object -ExpandProperty Node).InnerText
- ps: $env:release_version = [string]([int]((Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/ReleaseVersion" | Select-Object -ExpandProperty Node).InnerText) + 1)
- ps: $env:revision = $env:GitVersion_CommitsSinceVersionSource
- ps: Update-AppveyorBuild -Version "$env:major_version.$env:minor_version.$env:release_version.$env:revision.$env:APPVEYOR_BUILD_NUMBER"
- ps: $xReleaseVersion = Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/ReleaseVersion"
- ps: $xReleaseVersion.Node.InnerText = $env:release_version
- ps: $xReleaseVersion.Node.OwnerDocument.Save($xReleaseVersion.Path)
- ps: $xRevision = Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/Revision"
- ps: $xRevision.Node.InnerText = $env:revision
- ps: $xRevision.Node.OwnerDocument.Save($xRevision.Path)
dotnet_csproj:
patch: false
before_build:
- cmd: dotnet restore "source\Common.sln"
build:
project: source\Common.sln
parallel: true
verbosity: minimal
after_build:
- cmd: scripts\InstallTestAssemblies.bat
after_test:
- cmd: scripts\UninstallTestAssemblies.bat
artifacts:
- path: 'bin\Release\EnterpriseLibrary.Common.*.nupkg'
name: 'EnterpriseLibrary.Common'
# on_success:
# - ps: git config --global credential.helper store
# - ps: Add-Content "$HOME\.git-credentials" "https://$($env:github_access_token):x-oauth-basic@github.com`n"
# - ps: git config --global user.email "$env:github_email"
# - ps: git config --global user.name "$env:github_name"
# - git pull
# - git commit -m "Revision update by AppVeyor [ci skip]" -- version.props
# - git push