-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathupdate-docs.ps1
More file actions
33 lines (28 loc) · 816 Bytes
/
update-docs.ps1
File metadata and controls
33 lines (28 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<#
.SYNOPSIS
Regenerate the docs.
.DESCRIPTION
Regenerate the docs for all exercises based on the latest canonical data.
.PARAMETER Exercise
The slug of the exercise to regenerate the doc for (optional).
.EXAMPLE
The example below will regenerate all docs
PS C:\> ./update-docs.ps1
.EXAMPLE
The example below will regenerate the doc for the "acronym" exercise
PS C:\> ./update-docs.ps1 acronym
#>
param (
[Parameter(Position = 0, Mandatory = $false)]
[string]$Exercise
)
# Import shared functionality
. ./shared.ps1
function Update-Docs {
Write-Output "Updating docs"
$args = if ($Exercise) { @("-o", $Exercise) } else { @() }
Run-Command "./bin/fetch-configlet"
Run-Command "./bin/configlet sync --docs --update --yes $args"
}
Update-Docs
exit $LastExitCode