We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81e8f81 commit 41f8dfbCopy full SHA for 41f8dfb
1 file changed
scripts/website/copy_jsonschema/main.go
@@ -6,6 +6,7 @@ import (
6
"log"
7
"os"
8
"path/filepath"
9
+ "strings"
10
11
hcversion "github.com/hashicorp/go-version"
12
@@ -32,6 +33,22 @@ func copySchemas() error {
32
33
return fmt.Errorf("copy FS: %w", err)
34
}
35
36
+ matches, err := filepath.Glob(filepath.Join(dstDir, "*"))
37
+ if err != nil {
38
+ return fmt.Errorf("glob: %w", err)
39
+ }
40
+
41
+ for _, match := range matches {
42
+ if strings.HasSuffix(match, ".json") {
43
+ continue
44
45
46
+ err = os.RemoveAll(match)
47
48
+ log.Printf("removing %q: %v", match, err)
49
50
51
52
err = copyLatestSchema(dstDir)
53
if err != nil {
54
return fmt.Errorf("copy files: %w", err)
0 commit comments