File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,10 @@ async function transformBundle({
149
149
toAbsolutePath ( `website/src/generated/${ clientName } -snippets.js` ) ,
150
150
`export const snippets = ${ transformCodeSamplesToGuideMethods ( JSON . parse ( JSON . stringify ( snippetSamples ) ) ) } ` ,
151
151
) ;
152
+ await fsp . writeFile (
153
+ toAbsolutePath ( `website/src/generated/${ clientName } -snippets.json` ) ,
154
+ transformCodeSamplesToGuideMethods ( JSON . parse ( JSON . stringify ( snippetSamples ) ) ) ,
155
+ ) ;
152
156
}
153
157
154
158
for ( const [ pathKey , pathMethods ] of Object . entries ( bundledSpec . paths ) ) {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ async function pushToAlgoliaDoc(): Promise<void> {
28
28
. map ( ( coAuthor ) => coAuthor . trim ( ) )
29
29
. filter ( Boolean ) ;
30
30
31
- if ( ! lastCommitMessage . startsWith ( commitStartRelease ) ) {
31
+ if ( ! process . env . DRY_RUN && ! lastCommitMessage . startsWith ( commitStartRelease ) ) {
32
32
return ;
33
33
}
34
34
@@ -48,7 +48,7 @@ async function pushToAlgoliaDoc(): Promise<void> {
48
48
await emptyDirExceptForDotGit ( dest ) ;
49
49
await run ( `cp ${ toAbsolutePath ( 'specs/bundled/*.doc.yml' ) } ${ dest } ` ) ;
50
50
await run ( `cp ${ toAbsolutePath ( 'config/release.config.json' ) } ${ dest } ` ) ;
51
- await run ( `cp ${ toAbsolutePath ( 'website/src/generated/*.js ' ) } ${ dest } ` ) ;
51
+ await run ( `cp ${ toAbsolutePath ( 'website/src/generated/*.json ' ) } ${ dest } ` ) ;
52
52
await run ( `cp ${ toAbsolutePath ( 'website/static/img/*-sla.png' ) } ${ dest } ` ) ;
53
53
54
54
if ( ( await getNbGitDiff ( { head : null , cwd : tempGitDir } ) ) === 0 ) {
Original file line number Diff line number Diff line change @@ -26,3 +26,4 @@ yarn-error.log*
26
26
specs
27
27
28
28
src /generated /* .js
29
+ src /generated /* .json
You can’t perform that action at this time.
0 commit comments