1
0
mirror of https://github.com/go-acme/lego.git synced 2025-10-31 08:27:38 +02:00

chore: remove existing files before generating new files (#2676)

This commit is contained in:
Ludovic Fernandez
2025-10-18 16:46:55 +02:00
committed by GitHub
parent b44293d8b1
commit 4022827c6e
3 changed files with 22 additions and 67 deletions

1
.gitattributes vendored
View File

@@ -1 +1,2 @@
**/zz_gen_*.* linguist-generated
docs/data/zz_cli_help.toml linguist-generated

View File

@@ -1,67 +0,0 @@
---
title: "Hetzner"
date: 2019-03-03T16:39:46+01:00
draft: false
slug: hetznerv1
dnsprovider:
since: "v4.27.0"
code: "hetznerv1"
url: "https://hetzner.com"
---
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
<!-- providers/dns/hetznerv1/hetznerv1.toml -->
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
Configuration for [Hetzner](https://hetzner.com).
<!--more-->
- Code: `hetznerv1`
- Since: v4.27.0
Here is an example bash command using the Hetzner provider:
```bash
HETZNER_API_TOKEN="xxxxxxxxxxxxxxxxxxxxx" \
lego --email you@example.com --dns hetznerv1 -d '*.example.com' -d example.com run
```
## Credentials
| Environment Variable Name | Description |
|-----------------------|-------------|
| `HETZNER_API_TOKEN` | API token |
The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
More information [here]({{% ref "dns#configuration-and-credentials" %}}).
## Additional Configuration
| Environment Variable Name | Description |
|--------------------------------|-------------|
| `HETZNER_HTTP_TIMEOUT` | API request timeout in seconds (Default: 30) |
| `HETZNER_POLLING_INTERVAL` | Time between DNS propagation check in seconds (Default: 2) |
| `HETZNER_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation in seconds (Default: 60) |
| `HETZNER_TTL` | The TTL of the TXT record used for the DNS challenge in seconds (Default: 120) |
The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
More information [here]({{% ref "dns#configuration-and-credentials" %}}).
## More information
- [API documentation](https://docs.hetzner.cloud/reference/cloud#dns)
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
<!-- providers/dns/hetznerv1/hetznerv1.toml -->
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->

View File

@@ -48,6 +48,11 @@ func main() {
log.Fatal(err)
}
err = cleanDocumentation()
if err != nil {
log.Fatal(err)
}
for _, m := range models.Providers {
// generate documentation
err = generateDocumentation(m)
@@ -71,6 +76,22 @@ func main() {
fmt.Printf("Documentation for %d DNS providers has been generated.\n", len(models.Providers)+1)
}
func cleanDocumentation() error {
paths, err := filepath.Glob(filepath.Join(docOutput, "zz_gen_*.md"))
if err != nil {
return err
}
for _, p := range paths {
err = os.RemoveAll(p)
if err != nil {
return err
}
}
return nil
}
func generateDocumentation(m descriptors.Provider) error {
filename := filepath.Join(docOutput, "zz_gen_"+m.Code+".md")