Skip to content

Commit

Permalink
Merge pull request abpframework#10884 from abpframework/auto-merge/re…
Browse files Browse the repository at this point in the history
…l-5-0/692

Merge branch dev with rel-5.0
  • Loading branch information
maliming authored Dec 8, 2021
2 parents 3af302e + e4be6fb commit 9858d39
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,5 @@ tempkey.jwk
# [Disabled for now] *.abppkg.analyze.json

# appsettings.secrets.json
appsettings.secrets.json
appsettings.secrets.json
deploy/nuget-api-key.txt
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>5.0.0-rc.1</Version>
<Version>5.0.0-rc.2</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl>
<PackageProjectUrl>https://abp.io/</PackageProjectUrl>
Expand Down
11 changes: 7 additions & 4 deletions nupkg/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ foreach($solution in $solutions) {
}

# Create all packages
$i = 0
foreach($project in $projects) {

$i += 1
$projectFolder = Join-Path $rootFolder $project
$projectName = ($project -split '/')[-1]

# Create nuget pack
# Create nuget pack
Write-Host ("-----===[ $i / " + $projects.length + " - " + $projectName + " ]===-----")
Set-Location $projectFolder
Remove-Item -Recurse (Join-Path $projectFolder "bin/Release")
Remove-Item -Force -Recurse (Join-Path $projectFolder "bin/Release")
& dotnet pack -c Release

if (-Not $?) {
Expand All @@ -25,7 +28,7 @@ foreach($project in $projects) {
# Copy nuget package
$projectName = $project.Substring($project.LastIndexOf("/") + 1)
$projectPackPath = Join-Path $projectFolder ("/bin/Release/" + $projectName + ".*.nupkg")
Move-Item $projectPackPath $packFolder
Move-Item -Force $projectPackPath $packFolder
}

# Go back to the pack folder
Expand Down
27 changes: 23 additions & 4 deletions nupkg/push_packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,29 @@ $apiKey = $args[0]
$version = $commonPropsXml.Project.PropertyGroup.Version

# Publish all packages
$i = 0
$nugetUrl = "https://api.nuget.org/v3/index.json"
Set-Location $packFolder

foreach($project in $projects) {
$projectName = $project.Substring($project.LastIndexOf("/") + 1)
& dotnet nuget push ($projectName + "." + $version + ".nupkg") --skip-duplicate -s https://api.nuget.org/v3/index.json --api-key "$apiKey"
$i += 1
$projectFolder = Join-Path $rootFolder $project
$projectName = ($project -split '/')[-1]
$nugetPackageName = $projectName + "." + $version + ".nupkg"
$nugetPackageExists = Test-Path $nugetPackageName -PathType leaf

Write-Host ("-----===[ $i / " + $projects.length + " - " + $nugetPackageName + " ]===-----")

if ($nugetPackageExists)
{
dotnet nuget push $nugetPackageName --skip-duplicate -s $nugetUrl --api-key "$apiKey"
Write-Host ("Deleting package from local: " + $nugetPackageName)
Remove-Item $nugetPackageName -Force
}
else
{
Write-Host ("********** ERROR PACKAGE NOT FOUND: " + $nugetPackageName)
#Exit
}
}

# Go back to the pack folder
Set-Location $packFolder

0 comments on commit 9858d39

Please sign in to comment.