Skip to content

Commit

Permalink
[bootstrap] No longer build TS refs automatically
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley committed Feb 18, 2021
1 parent da25d27 commit 2eb0bb4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8984,6 +8984,10 @@ const BootstrapCommand = {
_utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].success(`[${project.name}] bootstrap complete`);
}
});

if (!process.env.BUILD_TS_REFS_ON_BOOTSTRAP) {
_utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].info('For IDE TypeScript support run `node scripts/build_ts_refs` or set BUILD_TS_REFS_ON_BOOTSTRAP=true');
}
}

};
Expand Down
6 changes: 6 additions & 0 deletions packages/kbn-pm/src/commands/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,11 @@ export const BootstrapCommand: ICommand = {
log.success(`[${project.name}] bootstrap complete`);
}
});

if (!process.env.BUILD_TS_REFS_ON_BOOTSTRAP) {
log.info(
'For IDE TypeScript support run `node scripts/build_ts_refs` or set BUILD_TS_REFS_ON_BOOTSTRAP=true'
);
}
},
};
7 changes: 6 additions & 1 deletion scripts/build_ts_refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
*/

require('../src/setup_node_env');
require('../src/dev/typescript').runBuildRefsCli();

if (!process.env.npm_lifecycle_event || process.env.BUILD_TS_REFS_ON_BOOTSTRAP) {
require('../src/dev/typescript').runBuildRefsCli();
} else {
console.warn('ran from yarn script without env BUILD_TS_REFS_ON_BOOTSTRAP=true');
}
6 changes: 6 additions & 0 deletions test/scripts/jenkins_build_ts_refs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Build Typescript References" \
node scripts/build_ts_refs.js
3 changes: 3 additions & 0 deletions vars/tasks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def check() {
kibanaPipeline.scriptTask('Verify NOTICE', 'test/scripts/checks/verify_notice.sh'),
kibanaPipeline.scriptTask('Test Projects', 'test/scripts/checks/test_projects.sh'),
kibanaPipeline.scriptTask('Test Hardening', 'test/scripts/checks/test_hardening.sh'),
dir("${env.WORKSPACE}/kibana") {
kibanaPipeline.scriptTask('Build TS Refs', 'test/scripts/jenkins_build_ts_refs.sh')()
}
])
}

Expand Down

0 comments on commit 2eb0bb4

Please sign in to comment.