Skip to content

Commit 144c2ca

Browse files
Rely on npm more in make validate (#5352) (#5359)
(cherry picked from commit eca32a3) Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
1 parent 4ce1800 commit 144c2ca

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

compiler/run-validations.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,6 @@ async function run () {
126126
await $`npm install --prefix ${tsValidationPath}`
127127
}
128128

129-
const isCompilerBuilt = await $`[[ -d ${path.join(compilerPath, 'lib')} ]]`.exitCode === 0
130-
if (noCache || isStale || !isCompilerBuilt) {
131-
spinner.text = 'Optimizing the compiler'
132-
await $`npm run build --prefix ${compilerPath}`
133-
}
134-
135-
const isTsGeneratorBuilt = await $`[[ -d ${path.join(tsGeneratorPath, 'lib')} ]]`.exitCode === 0
136-
if (noCache || isStale || !isTsGeneratorBuilt) {
137-
spinner.text = 'Optimizing the ts generator'
138-
await $`npm run build --prefix ${tsGeneratorPath}`
139-
}
140-
141129
{
142130
spinner.text = 'Compiling specification'
143131
const Process = await nothrow($`npm run compile:specification --prefix ${compilerPath}`)
@@ -149,7 +137,7 @@ async function run () {
149137

150138
{
151139
spinner.text = 'Generating schema'
152-
const Process = await nothrow($`node ${path.join(compilerPath, 'lib', 'index.js')} --spec ${specPath} --output ${outputPath}`)
140+
const Process = await nothrow($`npm run generate-schema --prefix ${compilerPath} -- --spec ${specPath} --output ${outputPath}`)
153141
if (Process.exitCode !== 0) {
154142
spinner.fail(removeHeader(Process.stdout))
155143
console.log(Process.stderr)
@@ -159,7 +147,7 @@ async function run () {
159147

160148
{
161149
spinner.text = 'Generating typescript view'
162-
const Process = await nothrow($`node ${path.join(tsGeneratorPath, 'lib', 'index.js')}`)
150+
const Process = await nothrow($`npm run start --prefix ${tsGeneratorPath}`)
163151
if (Process.exitCode !== 0) {
164152
spinner.fail(removeHeader(Process.toString()))
165153
process.exit(1)

0 commit comments

Comments
 (0)