File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ async function getCommitRange(
8787 return { base : parents [ 0 ] . sha , head }
8888}
8989
90+ const specUrl = ( commit : string ) =>
91+ `https://raw.githubusercontent.com/oxidecomputer/omicron/${ commit } /openapi/nexus.json`
92+
9093async function genForCommit ( commit : string , force : boolean ) {
9194 const tmpDir = `/tmp/api-diff/${ commit } `
9295 const alreadyExists = await exists ( tmpDir + '/Api.ts' )
@@ -95,7 +98,8 @@ async function genForCommit(commit: string, force: boolean) {
9598 if ( force || ! alreadyExists ) {
9699 await $ `rm -rf ${ tmpDir } `
97100 await $ `mkdir -p ${ tmpDir } `
98- await $ `npm run --silent --prefix ../oxide.ts gen-from ${ commit } ${ tmpDir } `
101+ console . log ( `Generating for ${ commit } ...` )
102+ await $ `npx tsx ../oxide.ts/generator/index.ts ${ specUrl ( commit ) } ${ tmpDir } `
99103 await $ `npx prettier --write --log-level error ${ tmpDir } `
100104 }
101105
You can’t perform that action at this time.
0 commit comments