-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
当程序发布多个目标平台和体系结构时,运行时文件将会生成到`runtimes/RID`下,可能会冲突 # Release ## 更新 1. 默认`libsDir`从`runtimes`改为`libraries` ## 优化 1. 优化RID匹配以及主程序集识别
- Loading branch information
Showing
7 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ __MACOSX | |
[Rr]elease/ | ||
tools/ | ||
.nupkg/ | ||
Build/*/ | ||
|
||
# sublime | ||
*.sublime-workspace | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
$workingdir = $pwd | ||
$builddir = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
$rootdir = "${builddir}/.." | ||
$tooldir = "${builddir}/tools" | ||
$nupkgdir = "${builddir}/nupkg" | ||
$archivedir = "${builddir}/archive" | ||
|
||
# 清理 | ||
rm -rf $tooldir | ||
rm -rf $nupkgdir | ||
rm -rf $archivedir | ||
|
||
# 编译ncbeauty | ||
cd $rootdir | ||
make | ||
|
||
# 编译NetCoreBeautyNuget | ||
cd "${rootdir}/NetCoreBeautyNuget" | ||
dotnet pack -c Release /p:PackageOutputPath=${nupkgdir} | ||
|
||
# 编译NetCoreBeautyGlobalTool | ||
cd "${rootdir}/NetCoreBeautyGlobalTool" | ||
dotnet pack -c Release /p:PackageOutputPath=${nupkgdir} | ||
|
||
# 打包ncbeauty | ||
mkdir ${archivedir} | ||
"win-x86", "win-x64", "linux-x64", "osx-x64" | ForEach-Object -Process { | ||
$rid = $_ | ||
cd "${tooldir}/${rid}" | ||
Compress-Archive -Force -Path * -DestinationPath "${archivedir}/${rid}.zip" | ||
} | ||
|
||
cd $workingdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$vars = "NUGET_API_KEY", "GITHUB_SOURCE", "GITHUB_USERNAME", "GITHUB_ACCESS_TOKEN" | ||
|
||
$vars | ForEach-Object { | ||
if (!(Test-Path Env:$_)) { | ||
Write-Host "$_ environment variable is missing." | ||
exit 1 | ||
} | ||
} | ||
|
||
nuget source Add -Name "NuGet" -Source https://api.nuget.org/v3/index.json | ||
nuget source Add -Name "GitHub" -Source $env:GITHUB_SOURCE -UserName $env:GITHUB_USERNAME -Password $env:GITHUB_ACCESS_TOKEN | ||
nuget setApiKey $env:NUGET_API_KEY -Source "NuGet" | ||
|
||
$pwd = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
|
||
dir "$pwd/nupkg/*.nupkg" | ForEach-Object { | ||
$package = $_ -Replace $pwd, "" | ||
nuget push "$package" -Source "NuGet" | ||
nuget push "$package" -Source "GitHub" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters