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 31810c6 commit f71961a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8984,6 +8984,7 @@ const BootstrapCommand = {
_utils_log__WEBPACK_IMPORTED_MODULE_2__["log"].success(`[${project.name}] bootstrap complete`);
}
});
_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'
);
}
},
};
12 changes: 12 additions & 0 deletions scripts/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

require('../src/setup_node_env');

// require('../src/dev/typescript').runBuildRefsCli();
console.log(process);
5 changes: 4 additions & 1 deletion scripts/build_ts_refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
*/

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

if (process.env.npm_lifecycle_event && process.env.BUILD_TS_REFS_ON_BOOTSTRAP === 'true') {
require('../src/dev/typescript').runBuildRefsCli();
}
2 changes: 1 addition & 1 deletion src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY"
### install dependencies
###
echo " -- installing node.js dependencies"
yarn kbn bootstrap --verbose
BUILD_TS_REFS_ON_BOOTSTRAP=true yarn kbn bootstrap --verbose

###
### upload ts-refs-cache artifacts as quickly as possible so they are available for download
Expand Down

0 comments on commit f71961a

Please sign in to comment.