Ai
2 Star 0 Fork 0

mirrors_serilog/serilog-sinks-xamarin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Build.ps1 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
echo "build: Build started"
Push-Location $PSScriptRoot
if(Test-Path .\artifacts) {
echo "build: Cleaning .\artifacts"
Remove-Item .\artifacts -Force -Recurse
}
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "main" -and $revision -ne "local"]
$commitHash = $(git rev-parse --short HEAD)
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
echo "build: Package version suffix is $suffix"
echo "build: Build version suffix is $buildSuffix"
foreach ($src in ls src/*) {
Push-Location $src
echo "build: Packaging project in $src"
& msbuild /r /m /p:Configuration=Release /p:VersionSuffix=$suffix /p:EnableSourceLink=true "/p:PackageOutputPath=..\..\artifacts"
if($LASTEXITCODE -ne 0) { exit 1 }
Pop-Location
}
foreach ($test in ls test/*.Tests) {
Push-Location $test
echo "build: Testing project in $test"
& dotnet test -c Release
if($LASTEXITCODE -ne 0) { exit 3 }
Pop-Location
}
Pop-Location
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_serilog/serilog-sinks-xamarin.git
git@gitee.com:mirrors_serilog/serilog-sinks-xamarin.git
mirrors_serilog
serilog-sinks-xamarin
serilog-sinks-xamarin
dev

搜索帮助