Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @bolt/build-tools to skip Bolt version check during non-prod builds #949

Merged
merged 1 commit into from Nov 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/build-tools/utils/bolt-versions.js
Expand Up @@ -30,9 +30,26 @@ async function writeVersionDataToJson(versionData) {
}

async function gatherBoltVersions() {
const config = await getConfig();

const versionSpinner = ora(
chalk.blue('Gathering data on the latest Bolt Design System releases...'),
).start();

// Skip over checking for Bolt releases when not in prod mode to speed up the initial build
if (!config.prod) {
versionSpinner.succeed(
chalk.green('Skipped gathering data on every Bolt release -- dev build!'),
);
return [
{
label: 'Local Dev',
type: 'option',
value: `http://localhost:${config.port}/${config.startPath}`,
},
];
}

const tags = await gitSemverTags();

const tagUrls = [];
Expand Down