-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathappveyor.yml
More file actions
81 lines (69 loc) · 3.06 KB
/
appveyor.yml
File metadata and controls
81 lines (69 loc) · 3.06 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
image: Visual Studio 2022
configuration: Release
platform: Any CPU
skip_tags: true
services:
- mssql2017
- msmq
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
# Existing install steps
- 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)
- ps: |
Write-Host "Checking MSMQ service..."
$service = Get-Service MSMQ -ErrorAction SilentlyContinue
if ($service) {
Write-Host "MSMQ Service Status: $($service.Status)"
if ($service.Status -ne "Running") {
Start-Service MSMQ
Write-Host "Started MSMQ Service."
}
} else {
Write-Error "MSMQ Service not found on this image."
exit 1
}
dotnet_csproj:
patch: false
before_build:
- cmd: dotnet --version
- cmd: dotnet restore "source\Logging.sln"
build:
project: source\Logging.sln
parallel: true
verbosity: minimal
after_build:
- cmd: scripts\InstallTestAssemblies.bat
- cmd: scripts\CreateLoggingDatabase.bat
- dir /s /b
after_test:
- cmd: scripts\UninstallTestAssemblies.bat
- cmd: scripts\DropLoggingDatabase.bat
artifacts:
- path: 'bin\Release\EnterpriseLibrary.Logging.*.nupkg'
name: 'EnterpriseLibrary.Logging'
#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