Browse Source

Changed some documentation settings

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
40c76b84ea
2 changed files with 20 additions and 8 deletions
  1. +3
    -1
      IPA.Loader/Config/Config.cs
  2. +17
    -7
      appveyor.yml

+ 3
- 1
IPA.Loader/Config/Config.cs View File

@ -28,6 +28,7 @@ namespace IPA.Config
/// <summary> /// <summary>
/// The extension associated with this type, without the '.' /// The extension associated with this type, without the '.'
/// </summary> /// </summary>
/// <value>the extension to register the config provider as</value>
// ReSharper disable once UnusedAutoPropertyAccessor.Global // ReSharper disable once UnusedAutoPropertyAccessor.Global
public string Extension { get; private set; } public string Extension { get; private set; }
@ -52,6 +53,7 @@ namespace IPA.Config
/// <summary> /// <summary>
/// The order of preference for the config type. /// The order of preference for the config type.
/// </summary> /// </summary>
/// <value>the list of config extensions in order of preference</value>
// ReSharper disable once UnusedAutoPropertyAccessor.Global // ReSharper disable once UnusedAutoPropertyAccessor.Global
public string[] PreferenceOrder { get; private set; } public string[] PreferenceOrder { get; private set; }
@ -75,6 +77,7 @@ namespace IPA.Config
/// <summary> /// <summary>
/// The name to use for the config. /// The name to use for the config.
/// </summary> /// </summary>
/// <value>the name to use for the config</value>
// ReSharper disable once UnusedAutoPropertyAccessor.Global // ReSharper disable once UnusedAutoPropertyAccessor.Global
public string Name { get; private set; } public string Name { get; private set; }
@ -191,7 +194,6 @@ namespace IPA.Config
{ {
foreach (var provider in configProviders) foreach (var provider in configProviders)
{ {
if (provider.Item2.LastModified > provider.Item1.Value) if (provider.Item2.LastModified > provider.Item1.Value)
{ {
try try


+ 17
- 7
appveyor.yml View File

@ -78,27 +78,37 @@ before_deploy:
{ New-Item -ItemType directory -Path origin_site/tags } { New-Item -ItemType directory -Path origin_site/tags }
} }
function Do-DocFX($params)
{
Add-Content link_branch.json "{`"_gitContribute`":{`"sourceBranch`":`"$env:APPVEYOR_REPO_COMMIT`",`"apiSpecFolder`":`"docs/override`"}}"
& docfx metadata
Invoke-Expression "& docfx build --globalMetadataFiles link_branch.json $params"
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
}
if ($env:APPVEYOR_REPO_TAG -eq "true") if ($env:APPVEYOR_REPO_TAG -eq "true")
{ # Copy current site into tags { # Copy current site into tags
Do-DocFX "-o origin_site/tags"
Git-Do Git-Do
cd origin_site # make things a bit easier cd origin_site # make things a bit easier
$tagPath = "tags/$env:APPVEYOR_REPO_TAG_NAME" $tagPath = "tags/$env:APPVEYOR_REPO_TAG_NAME"
New-Item -ItemType directory -Path $tagPath New-Item -ItemType directory -Path $tagPath
Copy-Item -Path (Get-ChildItem -Exclude ('.git','tags')).FullName -Destination $tagPath -Recurse
#Copy-Item -Path (Get-ChildItem -Exclude ('.git','tags')).FullName -Destination $tagPath -Recurse
#pushd ..
#popd
Move-Item tags/_site $tagPath
git add -A 2>&1 git add -A 2>&1
git commit -q -a -m "Saved tag $env:APPVEYOR_REPO_TAG_NAME" 2>&1 git commit -q -a -m "Saved tag $env:APPVEYOR_REPO_TAG_NAME" 2>&1
} }
elseif (-Not $env:APPVEYOR_PULL_REQUEST_TITLE) elseif (-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{ # Generate docs { # Generate docs
Add-Content link_branch.json "{`"_gitContribute`":{`"sourceBranch`":`"$env:APPVEYOR_REPO_COMMIT`",`"apiSpecFolder`":`"docs/override`"}}"
& docfx metadata
& docfx build --globalMetadataFiles link_branch.json
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
Do-DocFX
Git-Do Git-Do


Loading…
Cancel
Save