7 Star 15 Fork 0

Gitee 极速下载 / hangfire

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/HangfireIO/Hangfire
克隆/下载
coverity-scan.ps1 2.10 KB
一键复制 编辑 原始数据 按行查看 历史
Sergey Odinokov 提交于 2024-02-12 14:44 . Update coverity-scan.ps1
cov-configure --cs
cov-build.exe --dir cov-int build.bat compile
# Compress results.
"Compressing Coverity results..."
$zipEncoderDef = @'
namespace AnalyseCode {
public class PortableFileNameEncoder: System.Text.UTF8Encoding {
public PortableFileNameEncoder() {}
public override byte[] GetBytes(string entry) {
return base.GetBytes(entry.Replace("\\", "/"));
}
}
}
'@
Add-Type -TypeDefinition $zipEncoderDef
[IO.Compression.ZipFile]::CreateFromDirectory(
"$env:APPVEYOR_BUILD_FOLDER\cov-int",
"$env:APPVEYOR_BUILD_FOLDER\$env:APPVEYOR_PROJECT_NAME.zip",
[IO.Compression.CompressionLevel]::Optimal,
$true, # include root directory
(New-Object AnalyseCode.PortableFileNameEncoder))
# Upload results to Coverity server.
"Uploading Coverity results..."
Add-Type -AssemblyName "System.Net.Http"
$client = New-Object Net.Http.HttpClient
$client.Timeout = [TimeSpan]::FromMinutes(20)
$form = New-Object Net.Http.MultipartFormDataContent
# Fill token field.
[Net.Http.HttpContent]$formField =
New-Object Net.Http.StringContent($env:COVERITY_TOKEN)
$form.Add($formField, '"token"')
# Fill email field.
$formField = New-Object Net.Http.StringContent($env:COVERITY_EMAIL)
$form.Add($formField, '"email"')
# Fill file field.
$fs = New-Object IO.FileStream(
"$env:APPVEYOR_BUILD_FOLDER\$env:APPVEYOR_PROJECT_NAME.zip",
[IO.FileMode]::Open,
[IO.FileAccess]::Read)
$formField = New-Object Net.Http.StreamContent($fs)
$form.Add($formField, '"file"', "$env:APPVEYOR_PROJECT_NAME.zip")
# Fill version field.
$formField = New-Object Net.Http.StringContent($env:APPVEYOR_BUILD_VERSION)
$form.Add($formField, '"version"')
# Fill description field.
$formField = New-Object Net.Http.StringContent("AppVeyor scheduled build.")
$form.Add($formField, '"description"')
# Submit form.
$url = "https://scan.coverity.com/builds?project=$env:APPVEYOR_REPO_NAME"
$task = $client.PostAsync($url, $form)
try {
$task.Wait() # throws AggregateException on timeout
} catch [AggregateException] {
throw $_.Exception.InnerException
}
$task.Result
$fs.Close()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/hangfire.git
git@gitee.com:mirrors/hangfire.git
mirrors
hangfire
hangfire
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891