Skip to content

Commit 0a14c3a

Browse files
committed
Readability tweaks to make.mjs code
1 parent cee5e81 commit 0a14c3a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.ci/make.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,23 @@ async function bump (args) {
9696

9797
// this command can only be executed locally for now
9898
async function codegen (args) {
99-
assert(args.length === 1, 'Bump task expects one parameter')
100-
const clientGeneratorPath = join(import.meta.url, '..', '..', 'elastic-client-generator-js')
99+
assert(args.length === 1, 'Codegen task expects one parameter')
101100
const [version] = args
102101

102+
const clientGeneratorPath = join(import.meta.url, '..', '..', 'elastic-client-generator-js')
103103
const isGeneratorCloned = await $`[[ -d ${clientGeneratorPath} ]]`.exitCode === 0
104104
assert(isGeneratorCloned, 'You must clone the elastic-client-generator-js first')
105105

106106
await $`npm install --prefix ${clientGeneratorPath}`
107-
// this command will take a while!
107+
108+
// generate elasticsearch client. this command will take a while!
108109
if (version === 'main') {
109110
await $`npm run elasticsearch --prefix ${clientGeneratorPath} -- --version main`
110111
} else {
111112
await $`npm run elasticsearch --prefix ${clientGeneratorPath} -- --version ${version.split('.').slice(0, 2).join('.')}`
112113
}
113-
await $`npm run lint --prefix ${clientGeneratorPath}`
114+
// clean up fixable linter issues
115+
await $`npm run fix --prefix ${clientGeneratorPath}`
114116

115117
await $`rm -rf ${join(import.meta.url, '..', 'src', 'api')}`
116118
await $`mkdir ${join(import.meta.url, '..', 'src', 'api')}`

0 commit comments

Comments
 (0)