2021-04-06 07:36:14 -07:00
|
|
|
{{/* Fetch the current version of the Pulumi CLI doc." suffix. */}}
|
2023-01-17 12:59:56 -08:00
|
|
|
{{ $headers := dict }}
|
|
|
|
{{ with (os.Getenv "GITHUB_TOKEN") }}
|
|
|
|
{{ $token := printf "Bearer %s" . }}
|
|
|
|
{{ $headers = (dict "Authorization" $token) }}
|
|
|
|
{{ end }}
|
|
|
|
|
2023-05-15 22:40:53 -07:00
|
|
|
{{- $json := getJSON "https://api.github.com/repos/pulumi/docs/contents/content/docs/cli/commands/pulumi.md" $headers }}
|
2021-04-06 07:36:14 -07:00
|
|
|
{{ with $json }}
|
|
|
|
{{ $content := base64Decode .content }}
|
|
|
|
{{/* Remove front matter and "Auto generated by..." suffix. */}}
|
|
|
|
{{- $content = replaceRE "(?s)---.*---" "" $content -}}
|
|
|
|
{{- $content = replaceRE "(?m)^###### Auto generated by .*$" "" $content -}}
|
|
|
|
{{- markdownify $content -}}
|
|
|
|
{{ end }}
|