2017-09-29 20:25:47 +03:00
|
|
|
<Project>
|
2017-09-30 00:34:46 +03:00
|
|
|
<Target Name="Push" DependsOnTargets="_PushNuGet;_PushNpm" />
|
|
|
|
|
|
|
|
<Target Name="_PushNuGet">
|
2017-09-29 20:25:47 +03:00
|
|
|
<Error Text="Missing required property: NuGetPublishFeed" Condition=" '$(NuGetPublishFeed)' == '' "/>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<_PackagesToPush Include="$(BuildDir)*.nupkg" />
|
|
|
|
<_PackagesToPush Include="$(ArtifactsDir)mirror\*.nupkg" />
|
2017-09-30 00:14:57 +03:00
|
|
|
<_LineupPackagesToPush Include="$(LineupBuildDir)*.nupkg" />
|
2017-09-29 20:25:47 +03:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PushNuGetPackages
|
|
|
|
Packages="@(_PackagesToPush)"
|
|
|
|
Feed="$(NuGetPublishFeed)"
|
|
|
|
Condition="@(_PackagesToPush->Count()) != 0"
|
|
|
|
ApiKey="$(APIKey)" />
|
|
|
|
|
|
|
|
<PushNuGetPackages
|
|
|
|
Packages="@(_LineupPackagesToPush)"
|
|
|
|
Feed="$(NuGetPublishFeed)"
|
|
|
|
Condition="@(_LineupPackagesToPush->Count()) != 0"
|
|
|
|
ApiKey="$(APIKey)" />
|
|
|
|
</Target>
|
2017-09-30 00:34:46 +03:00
|
|
|
|
|
|
|
<Target Name="_PushNpm">
|
|
|
|
<Error Text="Missing required property: NpmRegistry" Condition=" '$(NpmRegistry)' == '' "/>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<AuthTokenSetting>$(NpmRegistry.Replace("https:", "")):_authToken</AuthTokenSetting>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<NpmModuleArtifact Include="$(BuildDir)*.tgz" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Exec Command="npm config set "$(AuthTokenSetting)" $(APIKey)" Condition=" '$(APIKey)' != '' " />
|
|
|
|
<Exec Command="npm publish --registry $(NpmRegistry) "%(NpmModuleArtifact.Identity)""
|
|
|
|
Condition="@(NpmModuleArtifact->Count()) != 0"
|
|
|
|
ContinueOnError="true">
|
|
|
|
<Output TaskParameter="ExitCode" ItemName="ExitCodes" />
|
|
|
|
</Exec>
|
|
|
|
<Exec Command="npm config delete $(AuthTokenSetting)" Condition=" '$(APIKey)' != '' "/>
|
|
|
|
<Error Text="Publishing npm modules failed" Condition="%(ExitCodes.Identity) > 0"/>
|
|
|
|
</Target>
|
2017-09-29 20:25:47 +03:00
|
|
|
</Project>
|