Created
March 10, 2017 18:39
-
-
Save adamdriscoll/6ad1c923ce90760719dd6e79891734ad to your computer and use it in GitHub Desktop.
Create a NuGet package for a .NET project.
This file contains hidden or 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
param($Configuration) | |
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent | |
mkdir $PSScriptRoot\package -ErrorAction SilentlyContinue | Out-Null | |
mkdir $PSScriptRoot\package\lib -ErrorAction SilentlyContinue | Out-Null | |
mkdir $PSScriptRoot\package\content -ErrorAction SilentlyContinue | Out-Null | |
Copy-Item "$PSScriptRoot\bin\$Configuration\*.DLL" $PSScriptRoot\package\lib -Force | |
Copy-Item "$PSScriptRoot\bin\$Configuration\*.key" $PSScriptRoot\package\content -Force | |
Copy-Item "$PSScriptRoot\MyProject.nuspec" $PSScriptRoot\package -Force | |
& "$PSScriptRoot\..\nuget.exe" pack $PSScriptRoot\package\MyProject.nuspec | |
& "$PSScriptRoot\..\nuget.exe" sources add -Name Local -Source $PSScriptRoot\..\localPackages | |
& "$PSScriptRoot\..\nuget.exe" add MyProject.1.0.0.nupkg -source $PSScriptRoot\..\localPackages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment