summaryrefslogtreecommitdiff
path: root/update-docs.ps1
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-04-24 16:58:27 -0600
committerRui Marinho <me@ruimarinho.net>2016-04-24 18:58:27 -0400
commit053b7c272a96ac396fd849bcd1f6c84cbde456cf (patch)
tree4edf4fb799183b32bd7d04f618eacc368461a433 /update-docs.ps1
parentf578efa39f7846549ded0a962c8556292fc9ed57 (diff)
downloadxamarin-forms-053b7c272a96ac396fd849bcd1f6c84cbde456cf.tar.gz
xamarin-forms-053b7c272a96ac396fd849bcd1f6c84cbde456cf.tar.bz2
xamarin-forms-053b7c272a96ac396fd849bcd1f6c84cbde456cf.zip
Detect docs for new types in update-docs.ps1 (#122)
* Detect docs for new types in update-docs.ps1 * Add check for missing DLLs before running
Diffstat (limited to 'update-docs.ps1')
-rw-r--r--update-docs.ps117
1 files changed, 16 insertions, 1 deletions
diff --git a/update-docs.ps1 b/update-docs.ps1
index 86b3eb84..ada3e6b1 100644
--- a/update-docs.ps1
+++ b/update-docs.ps1
@@ -14,7 +14,11 @@ function Update
)
Write-Host "Updating docs for $dllPath ..."
- & $MdocPath update --delete $dllPath -L $ProfilePath --out $docsPath
+ if(Test-Path $dllPath) {
+ & $MdocPath update --delete $dllPath -L $ProfilePath --out $docsPath
+ } else {
+ Write-Warning "$dllPath was not found; you may need to rebuild"
+ }
}
function ParseChanges
@@ -28,6 +32,10 @@ function ParseChanges
$suggestedCommands = @()
+ if($changes.Length -eq 0){
+ return
+ }
+
$changes | % {$n=0} {
if($changes[$n+1] -match "Member Added:" -or $changes[$n+1] -match "Member Removed:"){
@@ -38,6 +46,13 @@ function ParseChanges
}
}
+
+ if($changes[$n] -match "^New Type: (.*)"){
+ $modified = "$($docsPath.Replace("\", "/"))/$(ClassToXMLPath($matches[1]))"
+ Write-Host "$modified was added"
+ $suggestedCommands += "git add $modified"
+ }
+
$n = $n + 1
}