Skip to content

Commit d6db1dd

Browse files
committed
improve sync examples workflow
1 parent 13cbc98 commit d6db1dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/sync_examples_from_provider.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ func getNewResource(version string) (map[string]struct{}, error) {
159159
changelog := string(content)
160160

161161
logStart := strings.Index(changelog, strings.TrimPrefix(version, "v"))
162+
if logStart == -1 {
163+
return nil, fmt.Errorf("cannot find the changelog of version %s", version)
164+
}
162165
logEnd := strings.Index(changelog[logStart:], "##")
163166

164167
latestLog := changelog[logStart : logStart+logEnd]

0 commit comments

Comments
 (0)