[netcore] Onboard Arcade (mono/mono#14301)
authorJo Shields <joshield@microsoft.com>
Thu, 2 May 2019 14:24:10 +0000 (10:24 -0400)
committerGitHub <noreply@github.com>
Thu, 2 May 2019 14:24:10 +0000 (10:24 -0400)
Commit migrated from https://github.com/mono/mono/commit/748da2e4a93e820540f857ee8c6d3f752141f4de

eng/empty.proj [new file with mode: 0644]
eng/publishwitharcade.proj [new file with mode: 0644]
src/mono/netcore/Makefile

diff --git a/eng/empty.proj b/eng/empty.proj
new file mode 100644 (file)
index 0000000..0bd280d
--- /dev/null
@@ -0,0 +1,15 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <!-- This project exists purely to work around Arcade
+       behavior. Arcade knows how to restore tasks needed for
+       publishing to blob feeds, but it requires a project file that
+       imports nuget restore targets to be specified for this to
+       work. See details in
+       https://github.com/dotnet/arcade/commit/f657be5cb7cd4920334dd9162173b131211a1e17#r31728598.
+  -->
+
+  <PropertyGroup>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+  </PropertyGroup>
+
+</Project>
diff --git a/eng/publishwitharcade.proj b/eng/publishwitharcade.proj
new file mode 100644 (file)
index 0000000..2701c65
--- /dev/null
@@ -0,0 +1,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\$(OSIdentifier)-$(BuildArch)</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>
index 03cc1bb..4fc34bf 100644 (file)
@@ -102,7 +102,7 @@ link-mono:
 prepare: $(ASPNETCORESDK_FILE) $(NETCORESDK_FILE) update-corefx update-roslyn link-mono
 
 nupkg:
-       nuget pack runtime.nuspec -properties VERSION=$(VERSION)$(VERSTUB)\;RID=$(RID)\;PLATFORM_AOT_SUFFIX=$(PLATFORM_AOT_SUFFIX)\;COREARCH=$(COREARCH)
+       nuget pack runtime.nuspec -properties VERSION=$(VERSION)$(VERSTUB)\;RID=$(RID)\;PLATFORM_AOT_SUFFIX=$(PLATFORM_AOT_SUFFIX)\;COREARCH=$(COREARCH) -OutputDirectory ../artifacts/
 
 clean:
        rm -rf sdk shared host dotnet tests obj corefx roslyn LICENSE.txt ThirdPartyNotices.txt $(NETCORESDK_FILE) $(ASPNETCORESDK_FILE)