Skip to content

Commit 515a725

Browse files
committed
Add PublicMyGet target
1 parent a9cacaf commit 515a725

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

build/build.proj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
<Exec Command="$(NuGet) pack ..\src\corelib\corelib.nuspec -OutputDirectory ..\artifacts\packages -Prop Configuration=$(Configuration) -Version $(Version) -Symbols" />
8080
</Target>
8181

82+
<!-- The publish targets don't depend upon Package because of how they are used on the CI server. At this point the code has been packaged and all that needs
83+
to happen is to publish the artifact. -->
8284
<Target Name="PublishNuGet" DependsOnTargets="DownloadNuGet">
8385
<Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -File check-nuget-version-exists.ps1 $(Version)" ConsoleToMSBuild="true">
8486
<Output TaskParameter="ConsoleOutput" PropertyName="ShouldPublishToNuGet" />
@@ -91,4 +93,10 @@
9193
Condition=" '$(ShouldPublishToNuGet)' == 'True' " />
9294
</Target>
9395

96+
<Target Name="PublishMyGet" DependsOnTargets="DownloadNuGet">
97+
<!-- We don't need to check for existing versions because MyGet lets you overwrite -->
98+
<!-- The environment variable BAMBOO_MYGET_PASSWORD comes from the nuget.password variable defined on the openstack.net plan in Bamboo -->
99+
<Exec Command="$(NuGet) push ..\artifacts\packages\openstack.net.$(Version).nupkg %25BAMBOO_MYGET_PASSWORD%25 -Source https://www.myget.org/F/openstacknetsdk/api/v2"/>
100+
</Target>
101+
94102
</Project>

0 commit comments

Comments
 (0)