Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11064,7 +11064,8 @@ let run = exports.run = (() => {
e: 'exclude',
h: 'help',
i: 'include'
}
},
boolean: ['prefer-offline', 'frozen-lockfile']
});
const args = options._;
if (options.help || args.length === 0) {
Expand Down Expand Up @@ -12199,8 +12200,7 @@ const BootstrapCommand = exports.BootstrapCommand = {
batchByWorkspace: true
});
const batchedProjects = (0, _projects.topologicallyBatchProjects)(projects, projectGraph);
const frozenLockfile = options['frozen-lockfile'] === true;
const extraArgs = frozenLockfile ? ['--frozen-lockfile'] : [];
const extraArgs = [...(options['frozen-lockfile'] === true ? ['--frozen-lockfile'] : []), ...(options['prefer-offline'] === true ? ['--prefer-offline'] : [])];
_log.log.write(_chalk2.default.bold('\nRunning installs in topological order:'));
for (const batch of batchedProjectsByWorkspace) {
for (const project of batch) {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-pm/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export async function run(argv: string[]) {
h: 'help',
i: 'include',
},
boolean: ['prefer-offline', 'frozen-lockfile'],
});

const args = options._;
Expand Down
6 changes: 4 additions & 2 deletions packages/kbn-pm/src/commands/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export const BootstrapCommand: ICommand = {
});
const batchedProjects = topologicallyBatchProjects(projects, projectGraph);

const frozenLockfile = options['frozen-lockfile'] === true;
const extraArgs = frozenLockfile ? ['--frozen-lockfile'] : [];
const extraArgs = [
...(options['frozen-lockfile'] === true ? ['--frozen-lockfile'] : []),
...(options['prefer-offline'] === true ? ['--prefer-offline'] : []),
];

log.write(chalk.bold('\nRunning installs in topological order:'));

Expand Down
7 changes: 6 additions & 1 deletion src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ hash -r
yarnVersion="$(node -e "console.log(String(require('./package.json').engines.yarn || '').replace(/^[^\d]+/,''))")"
npm install -g yarn@^${yarnVersion}

###
### setup yarn offline cache
###
yarn config set yarn-offline-mirror "$cacheDir/yarn-offline-cache"

###
### "install" yarn into this shell
###
Expand All @@ -95,7 +100,7 @@ hash -r
### install dependencies
###
echo " -- installing node.js dependencies"
yarn kbn bootstrap
yarn kbn bootstrap --prefer-offline

###
### verify no git modifications
Expand Down