Integrate sourcelink - https://github.com/dotnet/sourcelink (#260)
* Integrate sourcelink https://github.com/dotnet/sourcelink * Add /p:ContinuousIntegrationBuild=true to build.ps1 * Update Xamarin.Essentials.csproj * Update build.ps1 * Update to latest source link * Only add sourcelink in release config * Cleanup build for mac * Add properties to turn off CI on device tests. * Use strings * Use list * missed one * Only add on release and windows :)
This commit is contained in:
Родитель
b558e6de96
Коммит
a4f59ede9e
|
@ -96,6 +96,7 @@ Task ("build-ios")
|
|||
c.Configuration = "Release";
|
||||
c.Properties["Platform"] = new List<string> { "iPhoneSimulator" };
|
||||
c.Properties["BuildIpa"] = new List<string> { "true" };
|
||||
c.Properties["ContinuousIntegrationBuild"] = new List<string> { "false" };
|
||||
c.Targets.Clear();
|
||||
c.Targets.Add("Rebuild");
|
||||
});
|
||||
|
@ -165,6 +166,7 @@ Task ("build-android")
|
|||
// needs to be debug so unit tests get discovered
|
||||
MSBuild (ANDROID_PROJ, c => {
|
||||
c.Configuration = "Debug";
|
||||
c.Properties["ContinuousIntegrationBuild"] = new List<string> { "false" };
|
||||
c.Targets.Clear();
|
||||
c.Targets.Add("Rebuild");
|
||||
});
|
||||
|
@ -237,6 +239,7 @@ Task ("test-android-emu")
|
|||
// Use the Install target to push the app onto emulator
|
||||
MSBuild (ANDROID_PROJ, c => {
|
||||
c.Configuration = "Debug";
|
||||
c.Properties["ContinuousIntegrationBuild"] = new List<string> { "false" };
|
||||
c.Properties["AdbTarget"] = new List<string> { "-s " + emuSerial };
|
||||
c.Targets.Clear();
|
||||
c.Targets.Add("Install");
|
||||
|
@ -272,6 +275,7 @@ Task ("build-uwp")
|
|||
// Build the project (with ipa)
|
||||
MSBuild (UWP_PROJ, c => {
|
||||
c.Configuration = "Debug";
|
||||
c.Properties["ContinuousIntegrationBuild"] = new List<string> { "false" };
|
||||
c.Properties["AppxBundlePlatforms"] = new List<string> { "x86" };
|
||||
c.Properties["AppxBundle"] = new List<string> { "Always" };
|
||||
c.Targets.Clear();
|
||||
|
|
|
@ -7,6 +7,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
DeviceTests\build.cake = DeviceTests\build.cake
|
||||
build.ps1 = build.ps1
|
||||
DeviceTests\build.ps1 = DeviceTests\build.ps1
|
||||
DeviceTests\build.sh = DeviceTests\build.sh
|
||||
LICENSE = LICENSE
|
||||
nugetreadme.txt = nugetreadme.txt
|
||||
README.md = README.md
|
||||
|
|
|
@ -32,17 +32,26 @@
|
|||
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=868960</PackageProjectUrl>
|
||||
<MDocDocumentationDirectory>$(MSBuildThisFileDirectory)..\docs\en</MDocDocumentationDirectory>
|
||||
<Configurations>Debug;Release;Samples</Configurations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Samples'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
|
||||
<DebugType>full</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Samples'">
|
||||
<PropertyGroup Condition=" '$(Configuration)'=='Release' And '$(OS)' == 'Windows_NT' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<!-- sourcelink: Declare that the Repository URL can be published to NuSpec -->
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<!-- sourcelink: Embed source files that are not tracked by the source control manager to the PDB -->
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!-- sourcelink: Include PDB in the built .nupkg -->
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)'=='Release' And '$(OS)' == 'Windows_NT' ">
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\nugetreadme.txt" PackagePath="readme.txt" Pack="true" />
|
||||
<PackageReference Include="mdoc" Version="5.7.2" PrivateAssets="All" />
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$cibuild = "false"
|
||||
|
||||
# Make sure that we have something on non-bots
|
||||
if (!$env:BUILD_NUMBER) {
|
||||
$env:BUILD_NUMBER = "0"
|
||||
|
@ -12,20 +14,21 @@ if ($IsMacOS) {
|
|||
$vswhere = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'
|
||||
$msbuild = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
|
||||
$msbuild = join-path $msbuild 'MSBuild\15.0\Bin\MSBuild.exe'
|
||||
$cibuild = "true"
|
||||
}
|
||||
|
||||
Write-Output "Using MSBuild from: $msbuild"
|
||||
|
||||
# Build the projects
|
||||
& $msbuild "./Xamarin.Essentials.sln" /restore /t:Build /p:Configuration=Release
|
||||
& $msbuild "./Xamarin.Essentials.sln" /restore /t:Build /p:Configuration=Release /p:ContinuousIntegrationBuild=$ciBuild /p:Deterministic=false
|
||||
if ($lastexitcode -ne 0) { exit $lastexitcode; }
|
||||
|
||||
# Create the stable NuGet package
|
||||
& $msbuild "./Xamarin.Essentials/Xamarin.Essentials.csproj" /t:Pack /p:Configuration=Release /p:VersionSuffix=".$env:BUILD_NUMBER"
|
||||
& $msbuild "./Xamarin.Essentials/Xamarin.Essentials.csproj" /t:Pack /p:Configuration=Release /p:ContinuousIntegrationBuild=$cibuild /p:Deterministic=false /p:VersionSuffix=".$env:BUILD_NUMBER"
|
||||
if ($lastexitcode -ne 0) { exit $lastexitcode; }
|
||||
|
||||
# Create the beta NuGet package
|
||||
& $msbuild "./Xamarin.Essentials/Xamarin.Essentials.csproj" /t:Pack /p:Configuration=Release /p:VersionSuffix=".$env:BUILD_NUMBER-beta"
|
||||
& $msbuild "./Xamarin.Essentials/Xamarin.Essentials.csproj" /t:Pack /p:Configuration=Release /p:ContinuousIntegrationBuild=$cibuild /p:Deterministic=false /p:VersionSuffix=".$env:BUILD_NUMBER-beta"
|
||||
if ($lastexitcode -ne 0) { exit $lastexitcode; }
|
||||
|
||||
# Copy everything into the output folder
|
||||
|
|
Загрузка…
Ссылка в новой задаче