@@ -100,7 +100,7 @@ func run(current, next string, realmode bool) error {
100100 return nil
101101 }
102102 switch filepath .Ext (path ) {
103- case ".go" , ".kt" , ".py" , ".json" :
103+ case ".go" , ".kt" , ".py" , ".json" , ".md" :
104104 c , err := os .ReadFile (path )
105105 if err != nil {
106106 return err
@@ -109,12 +109,16 @@ func run(current, next string, realmode bool) error {
109109 new := strings .ReplaceAll (old ,
110110 `"sqlc_version": "v` + current ,
111111 `"sqlc_version": "v` + next )
112+ new = strings .ReplaceAll (new ,
113+ `sqlc-version: "` + current ,
114+ `sqlc-version: "` + next )
115+ new = strings .ReplaceAll (new ,
116+ `sqlc-version: '` + current ,
117+ `sqlc-version: '` + next )
112118 new = strings .ReplaceAll (new , "sqlc v" + current , "sqlc v" + next )
113119 new = strings .ReplaceAll (new , "SQLC_VERSION=v" + current , "SQLC_VERSION=v" + next )
114- if realmode {
115- if err := os .WriteFile (path , []byte (new ), 0644 ); err != nil {
116- return fmt .Errorf ("write error: %s: %w" , path , err )
117- }
120+ if err := write (path , old , new ); err != nil {
121+ return err
118122 }
119123 default :
120124 }
@@ -135,5 +139,12 @@ func run(current, next string, realmode bool) error {
135139 }
136140 }
137141
142+ {
143+ p := filepath .Join ("docs" )
144+ if err := filepath .Walk (p , walker ); err != nil {
145+ return err
146+ }
147+ }
148+
138149 return nil
139150}
0 commit comments