Skip to content

Commit 3cfe7dc

Browse files
committed
Added Publish step to msbuild
1 parent 59e6fc5 commit 3cfe7dc

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

build.proj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
<NuGetCommand>$(MSBuildProjectDirectory)\src\.nuget\NuGet.exe</NuGetCommand>
116116
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
117117
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
118+
<PowerShellCommand>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand>
118119
</PropertyGroup>
119120

120121
<!--
@@ -285,6 +286,14 @@
285286
<!--If we are testing locally then we copy the binaries and do not submit to the code sign server-->
286287
<Copy SourceFiles="@(InstallersToSign)" DestinationFolder="signed" Condition="$(DelaySign)" />
287288
</Target>
289+
290+
<!-- Publish all packages -->
291+
<Target Name="Publish" DependsOnTargets="Build">
292+
<Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
293+
<Message Importance="high" Text="Publishing Cmdlets..." />
294+
295+
<Exec Command="$(PowerShellCommand) -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(NuGetKey) \&quot;$(LibrarySourceFolder)\Package\$(Configuration)\&quot;&quot;"/>
296+
</Target>
288297

289298
<PropertyGroup>
290299
<RunTestLive Condition="'$(RunTestLive)' == ''">false</RunTestLive>

setup-powershellget/Setup/ShortcutStartup.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ This may take some time...
2828
"@
2929
Get-PackageProvider -Name NuGet -ForceBootstrap
3030
Install-Module AzureRM.Installer
31-
Install-AzureRM
3231
} else {
3332
cd c:\
3433
$welcomeMessage = @"

tools/PublishModules.ps1

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ if ([string]::IsNullOrEmpty($repositoryLocation))
3434
}
3535

3636
$packageFolder = "$PSScriptRoot\..\src\Package"
37-
$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
38-
. ($scriptFolder + '.\SetupEnv.ps1')
39-
40-
if (Test-Path $packageFolder) {
41-
Remove-Item -Path $packageFolder -Recurse -Force
42-
}
43-
44-
# Build the cmdlets in debug mode
45-
msbuild "$env:AzurePSRoot\build.proj" /t:"BuildDebug"
4637

4738
$repoName = $(New-Guid).ToString()
4839
Register-PSRepository -Name $repoName -SourceLocation $repositoryLocation -PublishLocation $repositoryLocation -InstallationPolicy Trusted

0 commit comments

Comments
 (0)