Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
add pack script
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancyq committed Apr 22, 2019
1 parent 467f25d commit 5340816
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions nupkg/pack.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Paths
$packFolder = (Get-Item -Path "./" -Verbose).FullName
$slnPath = Join-Path $packFolder "../"
$srcPath = Join-Path $slnPath "src"

# List of projects
$projects = (
"Abp.Push.Common",
"Abp.Push",
"Abp.Push.EntityFrameworkCore"
)

# Rebuild solution
Set-Location $slnPath
& dotnet restore

# Copy all nuget packages to the pack folder
foreach($project in $projects) {

$projectFolder = Join-Path $srcPath $project

# Create nuget pack
Set-Location $projectFolder
Remove-Item -Recurse (Join-Path $projectFolder "bin/Release")
& dotnet msbuild /p:Configuration=Release /p:SourceLinkCreate=true
& dotnet msbuild /t:pack /p:Configuration=Release /p:SourceLinkCreate=true /p:IncludeReferencedProjects=true

# Copy nuget package
$projectPackPath = Join-Path $projectFolder ("/bin/Release/" + $project + ".*.nupkg")
Move-Item $projectPackPath $packFolder

}

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

0 comments on commit 5340816

Please sign in to comment.