Welcome to mirror list, hosted at ThFree Co, Russian Federation.

publishwitharcade.proj « eng - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bbadd124acc8b1777ca3d2c26a9b51b942260341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<Project DefaultTargets="PublishPackages">

  <!-- TODO: move properties imported from here into a common props file -->
  <!-- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> -->

  <!-- Use an explicit SDK import so that arcade uses the build
       configuration computed in dir.common.props. -->
  <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

  <Import Project="$(MSBuildThisFileDirectory)\..\.packages\microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />

  <PropertyGroup>
    <!-- Set the TargetFramework just to make the SDK happy -->
    <TargetFramework>net462</TargetFramework>
  </PropertyGroup>

  <Target Name="PublishPackages">

    <ItemGroup>
      <PackagesToPublish Include="$(MSBuildThisFileDirectory)\..\artifacts\*.nupkg" />
    </ItemGroup>

    <ItemGroup>
      <ItemsToPushToBlobFeed Include="@(PackagesToPublish)" />
    </ItemGroup>

    <Error Condition=" '$(AzureFeedUrl)' == '' " Text="AzureFeedUrl must be set" />
    <Error Condition=" '$(AzureAccountKey)' == '' " Text="AzureAccountKey must be set" />
    <Error Condition=" '$(BUILD_REPOSITORY_URI)' == '' " Text="BUILD_REPOSITORY_URI must be set" />
    <Error Condition=" '$(BUILD_SOURCEBRANCH)' == '' " Text="BUILD_SOURCEBRANCH must be set" />
    <Error Condition=" '$(BUILD_BUILDNUMBER)' == '' " Text="BUILD_BUILDNUMBER must be set" />
    <Error Condition=" '$(BUILD_SOURCEVERSION)' == '' " Text="BUILD_SOURCEVERSION must be set" />

    <PropertyGroup>
      <AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(AssetManifest)</AssetManifestFilePath>
    </PropertyGroup>

    <Message Importance="Low" Text="BUILD_REPOSITORY_URI: $(BUILD_REPOSITORY_URI)" />

    <PushToBlobFeed ExpectedFeedUrl="$(AzureFeedUrl)"
                    AccountKey="$(AzureAccountKey)"
                    ItemsToPush="@(ItemsToPushToBlobFeed)"
                    ManifestBuildData="Location=$(AzureFeedUrl)"
                    ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
                    ManifestBranch="$(BUILD_SOURCEBRANCH)"
                    ManifestBuildId="$(BUILD_BUILDNUMBER)"
                    ManifestCommit="$(BUILD_SOURCEVERSION)"
                    AssetManifestPath="$(AssetManifestFilePath)" />
  </Target>

</Project>