1 Star 0 Fork 95

workor/Newbe.Mahua.Framework

forked from Newbe36524/Newbe.Mahua.Framework
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.ps1 3.02 KB
一键复制 编辑 原始数据 按行查看 历史
Newbe36524 提交于 2017-06-27 23:03 . 1.1.0
Framework "4.6"
Properties {
$autoVersion = $false
}
Task Default -depends CI
Task CI -depends NugetPack -Description "持续集成" {
}
Task Nuget -Description "Nuget还原" {
Exec {
.nuget/nuget.exe restore "Newbe.Mahua.sln"
}
}
Task Build -depends Nuget -Description "编译解决方案" {
Exec {
msbuild "Newbe.Mahua.sln" /p:Configuration=Release
}
}
Task NugetPackWithVersion -depends Build -Description "生成Nuget包,自动版本号" {
[string]$version = [System.IO.File]::ReadAllText((Get-ChildItem nuget.version))
$versionNext = $null
if ($autoVersion) {
$v = New-Object System.Version($version)
$versionNext = New-Object System.Version($v.Major, $v.Minor, $v.Build , ($v.Revision + 1))
[System.IO.File]::WriteAllText("nuget.version", $versionNext)
}
else {
$versionNext = New-Object System.Version($version)
}
Exec {
Get-ChildItem Nuspecs *.nuspec -File | ForEach-Object {
.nuget/nuget.exe pack $_.FullName -Version $versionNext -OutputDirectory npks
}
}
}
Task NugetPack -depends Build -Description "生成Nuget包" {
Exec {
Get-ChildItem Nuspecs *.nuspec -File | ForEach-Object {
.nuget/nuget.exe pack $_.FullName -OutputDirectory npks
}
}
}
Task NugetPush -depends CI -Description "发布nuget包" {
Exec {
Get-ChildItem npks *.nupkg -File | ForEach-Object {
.nuget/nuget.exe push $_.FullName -Source nuget.org
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/cxd520/Newbe.Mahua.Framework.git
git@gitee.com:cxd520/Newbe.Mahua.Framework.git
cxd520
Newbe.Mahua.Framework
Newbe.Mahua.Framework
master

搜索帮助