Add some task to generate docs (#997)
* Add some task to generate docs * Use the new native master
This commit is contained in:
Родитель
d16fd524b0
Коммит
32690f42b4
18
build.cake
18
build.cake
|
@ -1,6 +1,7 @@
|
|||
#addin nuget:?package=Cake.Xamarin&version=3.0.2
|
||||
#addin nuget:?package=Cake.XCode&version=4.2.0
|
||||
#addin nuget:?package=Cake.FileHelpers&version=3.2.1
|
||||
#addin nuget:?package=Cake.Json&version=4.0.0&loaddependencies=true
|
||||
#addin nuget:?package=SharpCompress&version=0.24.0
|
||||
#addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.1.0-preview.1&prerelease&loaddependencies=true
|
||||
#addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1
|
||||
|
@ -68,7 +69,8 @@ if (!string.IsNullOrEmpty (PythonToolPath) && FileExists (PythonToolPath)) {
|
|||
System.Environment.SetEnvironmentVariable ("PATH", dir.FullPath + System.IO.Path.PathSeparator + oldPath);
|
||||
}
|
||||
|
||||
var AZURE_BUILD_URL = "https://dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_apis/build/builds/{0}/artifacts?artifactName={1}&%24format=zip&api-version=5.0";
|
||||
var AZURE_BUILD_SUCCESS = "https://dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_apis/build/builds?statusFilter=completed&resultFilter=succeeded&definitions=4&branchName=refs/heads/master&$top=1&api-version=5.1";
|
||||
var AZURE_BUILD_URL = "https://dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_apis/build/builds/{0}/artifacts?artifactName={1}&%24format=zip&api-version=5.1";
|
||||
|
||||
var TRACKED_NUGETS = new Dictionary<string, Version> {
|
||||
{ "SkiaSharp", new Version (1, 57, 0) },
|
||||
|
@ -429,6 +431,20 @@ Task ("nuget-validation")
|
|||
// DOCS - creating the xml, markdown and other documentation
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task ("download-last-successful-build")
|
||||
.WithCriteria (string.IsNullOrEmpty (AZURE_BUILD_ID))
|
||||
.Does (() =>
|
||||
{
|
||||
Warning ("A build ID (--azureBuildId=<ID>) was not specified, using the last successful build.");
|
||||
|
||||
var successUrl = string.Format(AZURE_BUILD_SUCCESS);
|
||||
var json = ParseJson (FileReadText (DownloadFile (successUrl)));
|
||||
|
||||
AZURE_BUILD_ID = (string)json ["value"] [0] ["id"];
|
||||
|
||||
Information ($"Using last successful build ID {AZURE_BUILD_ID}");
|
||||
});
|
||||
|
||||
Task ("update-docs")
|
||||
.IsDependentOn ("docs-api-diff")
|
||||
.IsDependentOn ("docs-update-frameworks")
|
||||
|
|
|
@ -745,11 +745,9 @@ Task ("externals-tizen")
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task ("externals-download")
|
||||
.IsDependentOn ("download-last-successful-build")
|
||||
.Does (() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty (AZURE_BUILD_ID))
|
||||
throw new Exception ("Specify a build ID with --azureBuildId=<ID>");
|
||||
|
||||
var artifactName = "native-default";
|
||||
var artifactFilename = $"{artifactName}.zip";
|
||||
var url = string.Format(AZURE_BUILD_URL, AZURE_BUILD_ID, artifactName);
|
||||
|
|
|
@ -36,11 +36,9 @@ void CopyChangelogs (DirectoryPath diffRoot, string id, string version)
|
|||
}
|
||||
|
||||
Task ("docs-download-output")
|
||||
.IsDependentOn ("download-last-successful-build")
|
||||
.Does (() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty (AZURE_BUILD_ID))
|
||||
throw new Exception ("Specify a build ID with --azureBuildId=<ID>");
|
||||
|
||||
var url = string.Format(AZURE_BUILD_URL, AZURE_BUILD_ID, "nuget");
|
||||
|
||||
EnsureDirectoryExists ("./output");
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 379f64c5526a2872e1a40ba32ffc75910b34b16b
|
||||
Subproject commit 6c864a6c858f77d7e20b37cd468103ae8d7e054b
|
Загрузка…
Ссылка в новой задаче