3 Star 1 Fork 0

Gitee 极速下载/IdentityServer3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/IdentityServer/IdentityServer3
克隆/下载
default.ps1 3.23 KB
一键复制 编辑 原始数据 按行查看 历史
Dominick Baier 提交于 2018-10-16 18:31 . 2.6.3 release
properties {
$base_directory = Resolve-Path .
$src_directory = "$base_directory\source"
$output_directory = "$base_directory\build"
$dist_directory = "$base_directory\distribution"
$sln_file = "$src_directory\IdentityServer3.sln"
$target_config = "Release"
$framework_version = "v4.5"
$xunit_path = "$src_directory\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe"
$ilmerge_path = "$src_directory\packages\ILMerge.2.14.1208\tools\ILMerge.exe"
$nuget_path = "$base_directory\nuget.exe"
$buildNumber = 0;
$version = "2.6.3.0"
$preRelease = $null
}
task default -depends Clean, RunTests, CreateNuGetPackage
task appVeyor -depends Clean, CreateNuGetPackage
task Clean {
rmdir $output_directory -ea SilentlyContinue -recurse
rmdir $dist_directory -ea SilentlyContinue -recurse
exec { msbuild /nologo /verbosity:quiet $sln_file /p:Configuration=$target_config /t:Clean }
}
task Compile -depends UpdateVersion {
exec { msbuild /nologo /verbosity:q $sln_file /p:Configuration=$target_config /p:TargetFrameworkVersion=v4.5 }
if ($LastExitCode -ne 0) {
exit $LastExitCode
}
}
task UpdateVersion {
$vSplit = $version.Split('.')
if($vSplit.Length -ne 4)
{
throw "Version number is invalid. Must be in the form of 0.0.0.0"
}
$major = $vSplit[0]
$minor = $vSplit[1]
$patch = $vSplit[2]
$assemblyFileVersion = "$major.$minor.$patch.$buildNumber"
$assemblyVersion = "$major.$minor.0.0"
$versionAssemblyInfoFile = "$src_directory/VersionAssemblyInfo.cs"
"using System.Reflection;" > $versionAssemblyInfoFile
"" >> $versionAssemblyInfoFile
"[assembly: AssemblyVersion(""$assemblyVersion"")]" >> $versionAssemblyInfoFile
"[assembly: AssemblyFileVersion(""$assemblyFileVersion"")]" >> $versionAssemblyInfoFile
}
task RunTests -depends Compile {
$project = "IdentityServer3.Tests"
mkdir $output_directory\xunit\$project -ea SilentlyContinue
.$xunit_path "$src_directory\Tests\UnitTests\bin\Release\$project.dll"
}
task ILMerge -depends Compile {
$input_dlls = "$output_directory\IdentityServer3.dll"
Get-ChildItem -Path $output_directory -Filter *.dll |
foreach-object {
# Exclude IdentityServer3.dll as that will be the primary assembly
if ("$_" -ne "IdentityServer3.dll" -and
"$_" -ne "Owin.dll") {
$input_dlls = "$input_dlls $output_directory\$_"
}
}
New-Item $dist_directory\lib\net45 -Type Directory
Invoke-Expression "$ilmerge_path /targetplatform:v4 /internalize /allowDup /target:library /out:$dist_directory\lib\net45\IdentityServer3.dll $input_dlls"
}
task CreateNuGetPackage -depends ILMerge {
$vSplit = $version.Split('.')
if($vSplit.Length -ne 4)
{
throw "Version number is invalid. Must be in the form of 0.0.0.0"
}
$major = $vSplit[0]
$minor = $vSplit[1]
$patch = $vSplit[2]
$packageVersion = "$major.$minor.$patch"
if($preRelease){
$packageVersion = "$packageVersion-$preRelease"
}
if ($buildNumber -ne 0){
$packageVersion = $packageVersion + "-build" + $buildNumber.ToString().PadLeft(5,'0')
}
copy-item $src_directory\IdentityServer3.nuspec $dist_directory
copy-item $output_directory\IdentityServer3.xml $dist_directory\lib\net45\
exec { . $nuget_path pack $dist_directory\IdentityServer3.nuspec -BasePath $dist_directory -OutputDirectory $dist_directory -version $packageVersion }
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/mirrors/IdentityServer3.git
[email protected]:mirrors/IdentityServer3.git
mirrors
IdentityServer3
IdentityServer3
master

搜索帮助